Handling virtual monitors and issues with them

Hi, I just found out that when a software wants to share a screen (e.g. Deskreen) KDE has an option to generate a virtual one on the spot, to manage it as an additional monitor.

However, I noticed that it’s always at 1920x1080, and the display settings don’t allow to change resolution.

I found out about the command krfb-virtualmonitor, which, while less convenient than a UI interface, does the job for this case. But it comes with two caveats:

  • it lives within the console session I launched the command in, I can’t close the console or the virtual monitor will be stopped
  • it needs for me to input the resolution, a name, a password, and a port, every time (could be circumvented with a script, but the above still applies, and it’s not that convenient)
  • every time I create or disable a virtual monitor created by krfb-virtualmonitor specifically, it messes up the arrangement and coordinates of the already connected real monitors (to the point they even overlap on top of each other and I have to manually place them back to their previous alignments)

I wonder if there’s a bettery way to handle all of this, and solve these issues.

One possible solution I thought about: if there’s a way to make a persistent virtual monitor with the settings I need, and if I’m not using it I could go in display configuration and uncheck the “enabled” display option to turn it off, and turn it back on when I need to.

Other ideas are very much welcome.

Why I’m doing this: I want to use a Samsung tablet as an additional screen, instead of mirroring existing ones. So far I found out about Deskreen and Weylus (the latter being really borked and stuttery unfortunately). This kind of software makes use of screen sharing, and using a virtual screen allows me to use that setup as an actual, additional physical screen.