I’d like to ask this question on behalf of the RustDesk project, though they haven’t specifically asked me to do so, I’m simply curious and hoping to help.
Is there currently any Wayland protocol or mechanism that would allow a remote desktop application to access or interact with the login screen (e.g. GDM or SDDM) while it’s running under a Wayland session?
If not, are there any ongoing discussions or proposals around enabling this kind of access for remote login use cases?
There is GNOME Remote Session service, but gdm3 is a huge mess and integration with other softs like Remmina or even more proper solutions is viable, but principle from xorg remote graphics tunneling app via ssh(in today world maybe with vnc) is not always possible(maybe with law or corporate laws)…
And GNOME is going into systemd-* and logins could change including gdm3 mess because accounts in GNOME is in huge rework, so maybe some heading with corporate backing could improve stacks, Virtuals is common but VNC is somewhere prohibited with good reasons and gdm3 is in some situation also due its unnatural bad shape, but remote desktop is a reality, maybe not so common towards GNOME due its not server nature of GNOME… including some DESKTOP-* needed behaviour for today corporate world…
I know the remote desktop that built in the DE exists, but it doesn’t work if the remote user have no ability to establish direct connections, this is why RustDesk or AnyDesk exists, because it has relay servers.
If the host system has a RustDesk/AnyDesk agent installed, similar to the gnome-remote-desktop agent that’s built into GNOME, I don’t see why it couldn’t work
RHEL 10 is Wayland only, so we’ll probably see some of these remoting solutions gaining support for Wayland over the coming years
The login screen is just another Wayland session. So rustdesk would need to run an instance of itself on the login screen, then do some connection-handover coordination to transfer the network connection from one instance to the other.
From my understanding, current RustDesk on Wayland session is using xdg-deaktop-portal, and didn’t utilise the “restore token” because this support is submitted long times ago, and most of the related code seems don’t have big changes for two years?(Not 100% sure)
I’m mentioning this:
Is there a stable API for capturing the Wayland login screen? If so, please give a hints, thanks!
Will the API different when using different compositors? (Mutter? Kwin?)
The wayland login screen is just a GNOME session. So you’ll need to have a process installed system-wide, and then get that process running inside of the GNOME session. This will probably get easier in GNOME 49 (I’m reworking the ways you’d install a service to be launched by the session, at the moment)
Once you’re running in the login screen’s session, I’m not certain that you’d be able to talk to the remote desktop portal. Maybe? Or maybe you’ll need to talk to a private Mutter API… Worth looking at what gnome-remote-desktop is doing
There are also plans to make it possible to install system services via Flatpak, and one of the usecases is to expose these kinds of agents that need to integrate into parts of the OS outside of the user’s session. However this API doesn’t exist yet, so at the moment this isn’t a feature that would work with Flatpak.