ScreenCast: CreateVirtualMonitor and RemoveVirtualMonitor #1872
Replies: 2 comments 7 replies
-
|
Is this about the use case covering a session that is primarily accessed remotely? If so, the portal API is not suitable, since its use case is about allowing a user to explicitly provide a way to share their screen. |
Beta Was this translation helpful? Give feedback.
-
Yes. This may not be the best suited API for unattended remote access, but it's the closest to a universal solution nevertheless. In #471 it looks like you are not against the idea of pre-authorizing the remote desktop/screencast portal. If that ever gets implemented, then I'm sure developers will try to use it for unattended remote access. I am aware that you are drafting a new remote desktop spec, which will work very well with our use case, but I'm not sure how far it is from materialization, and presumably it will take even longer for all major Wayland DEs to implement. The proposed change here on the contrary is trivial and incremental, and can be easily implemented. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are currently using Mutter's private APIs for Remote Desktop/ScreenCast. We would like to eventually switch to cross-DE APIs, so I'm making some proposal to close the feature gaps.
One thing we want to support is the ability to create and remove virtual monitors after the remote desktop session has started. Currently you can only create one virtual monitor by calling ScreenCast.SelectSources before calling RemoteDesktop.Start or ScreenCast.Start. We would like something like:
With the
optionsvardict being:cursor_mode(u): See ScreenCast:AvailableCursorModesnameoption in the vardict, which is a connector name in GNOME and an output name in KDE. This will allows us to, e.g., associate the PipeWire stream with the virtual monitor in GNOME's DisplayConfig API. I can live with an initial implementation without it though.It should return the following result via the org.freedesktop.portal.Request::Response signal:
stream: This is pretty much just a single entry ofstreamsofScreenCast.Start's resultAnd the corresponding
RemoveVirtualMonitormethod:With the
optionsvardict being:id: The opaque identifier in thestreamtuple ofCreateVirtualMonitor's responseWe can also introduce a new
DYNAMIC_VIRTUAL = 8type to AvailableSourceTypes. If only this source type is specified, no virtual monitors or streams should be created whenStartis called. This eliminates the one off oddity of the first virtual monitor. IfDYNAMIC_VIRTUALis not specified,CreateVirtualMonitorandRemoveVirtualMonitorshould fail. The portal backend could implement this as a checkbox in the confirmation/display selection dialog, if no permission has previously been granted.Given that
xdg-desktop-portal-gnomeuses the private Mutter API under the hood, and KDE developer claims kwin already supports creating arbitrary number of virtual monitors, it sounds like the proposed change should be trivial to implement.Beta Was this translation helpful? Give feedback.
All reactions