Remote desktop and screen casting in Wayland
Remote desktop and screen sharing in libmutter is split into two separate, but optionally combined parts: screen casting, and remote control. Both are exposed via their own D-Bus APIs. The data transfer and format negotiation of the screen casting is done by PipeWire.
The API currently exposed is not meant to be used by third party applications, and it's not unlikely it will change with future GNOME version. Work is currently being done to expose screen cast and remote desktop functionality via org.freedesktop.portal.* APIs, managed by xdg-desktop-portal. This way, sandboxed and non-sandboxed applications can use the exact same API.
How to test
In GNOME 3.26, screen casting and remote desktop functionality is not enabled by default. To enable, it needs to be enabled both on compile time and run time.
Enabling at compile time
To include screen cast and remote desktop functionality, pass --enable-remote-desktop to ./configure when building mutter.
Enable experimental setting
Besides enabling the feature at compile time, you also need to enable it at runtime. This is done by editing a gsetting key org.gnome.mutter.experimental-features. To do so, do as follows:
gsettings get org.gnome.mutter experimental-features
If the output of that command is either empty or , then run:
gsettings set org.gnome.mutter experimental-features "['screen-cast', 'remote-desktop']"
If the output of the first command was for example ['some-other-feature'], then run:
gsettings set org.gnome.mutter experimental-features "['some-other-feature', 'screen-cast', 'remote-desktop']"
Testing that it works
The easiest way to try out is to use this simple python script. Download it, and run
Remote desktop functionality is not implemented in mutter but in GNOME Remote Desktop. Currently only remote passwordless unencrypted VNC access to an existing session is supported. VNC support is provided via LibVNCServer.
To enable said VNC access, apart from instructions above, also follow the instructions below.
Install GNOME Remote Desktop. If you are running Fedora 27 or Fedara Rawhide, do so by running sudo dnf install gnome-remote-desktop (available soon). If not, if it is not available in your distribution of choice, you can compile it from source.
Open Settings, select Sharing, and enable Screen sharing. This should automatically enable the service and you should immediately be able to connect via VNC.
If you encounter unexpected crashes, screen casting or remote desktop access not functioning as expected, please report bug.