So, I’m yet another guy working on Chrome Remote Desktop Wayland support. I have read this thread and Headless remote sessions in GNOME, Part 2 and Headless remote sessions in GNOME, Part 3. I just want to check if my understanding of how Gnome Remote Desktop (GRD) handles the session handover is correct, and how we CRD, which does not use RDP as the underlying protocol, can achieve the same thing.
IIUC the way GRD works is:
-
GRD calls some GDM private API to create a headless greeter session and a corresponding RDP connection for it. The API returns a
remote_idandsession_idto GRD -
GRD uses RDP’s
ServerRedirectionfeature to redirect the GRD/RDP client to the new greeter RDP session -
User completes login within the greeter session, via the redirected RDP session.
-
GDM creates a new headless user session and the corresponding new RDP connection for it.
-
GRD redirects its client to the new user RDP connection.
Presumably CRD cannot replicate this flow. We could create something to bridge the RDP connection to the CRD protocol (which is essentially WebRTC), but that is going to be a big maintenance burden.
So, my questions are:
- Am I correct that GDM will create a virtual monitor for both the greeter session, and the user session?
- Am I correct that I can just use the Remote Desktop & ScreenCast Portals, or Mutter’s private APIs to capture the virtual monitors stated in Q1?
- Assuming Q1 and Q2 are correct. Do I create a monitor stream (e.g. RecordMonitor) as opposed to a virtual stream (e.g. RecordVirtual) to capture the virtual monitor?
- Based on our experience, capturing a virtual monitor with a monitor stream results in very bad performance, and the virtual monitor will not be resizable via PipeWire. Is it possible to prevent GDM from creating any (GDM-managed) virtual monitors, or are they simply not created if no clients have connected to the RDP session?