There are basically three separate use cases:
- Application remoting - either ssh in and run an application, or some sort of admin-setup wrapper to make a nice wrapper launcher on a remote desktop.
- Session remoting - connecting to an existing session and view or control it. This use case covers "helpdesk" scenarios, but also "resume what I was doing at work"
- Remote login - start a new session remotely
This is probably not the best use case to start with, for various reasons:
- It's specific to Wayland apps, and doesn't work for legacy X apps (Xwayland is a possibility with lots of complications)
- Some apps may have implicit dependencies on the session
- It doesn't share navigation to apps/settings/etc. with the normal session, so documentation is useless
- It's inherently tied to RDP, which we would probably not use as a transport otherwise
Aka "port vino to wayland". This is more relevant, and an implementation of helpdesk style remoting can be incrementally expanded to cover remote login.
Possible implementation strategies:
- Just do everything inside the shell process
- Use Pinos to set up an efficient transport (video4linux, dmabuf) channel to output frames to a separate process and a DBus interface to inject events and otherwise control GNOME Shell
The disadvantage of the first strategy is that it adds yet more complexity to the already too complex GNOME shell process.
Disadvantages of the pinos approach are the need to do event injection and that throttling rendering is less obvious to implement.
For a remoting protocol, at least initially the obvious thing is VNC. Using the tigervnc libraries makes it possible to get something going pretty quickly - the complexity of doing something with SPICE is going to be higher. But a lot of the work would be independent of the protocol. The unknown here is if we want to just encode to a H264 or other stream - this might require protocol work since VNC does not currently support it.
MarcAndreLureau: SPICE is gaining better video streaming capability, and there is some redundant effort to be able to encode a 3d framebuffer with hw encoder (most likely using dmabuf & gstreamer vaapi). Furthermore, some work has been done to support usb redirection without qemu, via an extra kernel module (ready but not accepted yet).
Beyond the things covered in the previous section, to handle logging into a session, you need:
- logind/PAM work to bring up a session that is a proper session but not tied to a VT
- have GNOME Shell be able to run in headless mode where it uses a render node to render but doesn't actually output to the display
- launch a GNOME session that runs GNOME Shell headless mode, runs the remoting server, hooks them up, and gets the output back to the launcher's network connection
All of these conceptually simple, but involve a lot of plumbing.