Possible to switch to desktop from SSH?

I hope this is an okay place to put this. I'm trying to do some home automation stuff because I use my computer both downstairs and upstairs. I have some bash scripts that send commands through kscreen-doctor to enable the right screens depending on where I'm using my computer. Those scripts do not work from gaming mode since a Wayland display isnt created in gaming mode( I can be wrong here).

So I need to figure out how to do one of two things.

A) trigger the switch to desktop via ssh command
B) be able to set kscreen-doctor commands while in gaming mode
Was this page helpful?