Skip to content

Draft: Added dbus apis to create and destroy virtual monitors

This patch adds two new dbus apis under org.gnome.Mutter.DisplayConfig

  • CreateVirtualMonitor
  • DestroyVirtualMonitor

For our use case with DCV, we would like to have an api that can give us a finer control over the virtual monitor creation/destruction cycle and also being able to do it in a synchronous way. The current approach with RecordVirtual is intrinsically asynchronous since the monitor is created when the PipeWireStreamAdded signal is triggered and it is destroyed after the RemoteDesktopSession is stopped, leaving us without much control over the monitor's life cycle.

I have updated the script gnome-screen-cast.py in order to test virtual monitors with the new apis:

- gnome-screen-cast.py -c 1920 1080 60 // create a virtual monitor of size 1920x1080@60
- gnome-screen-cast.py -d "monitor name" // delete a virtual monitor by name
- gnome-screen-cast.py -p // print the current monitors' layout 
Edited by Francesco Conti

Merge request reports