MATE desktop in Debian buster becomes remote desktop aware (RDA)

The MATE desktop environment in Debian will be the first desktop environment in Debian that has (still basic) support for detecting its graphical context (esp. detecting, if it is run inside a remote session).

With the packages mate-panel 1.20.4-2 and mate-screensaver 1.20.3-3, two new (preview) features entered Debian recently.

RDA in MATE's panel

If MATE is running inside an X2Go session, the MATE panel will (a) hide the "System" menu's shutdown menu item from users and (b) offer a menu item that allows users to suspend (disconnect) the X2Go session. See upstream PR #824 [1]. More integrations may come, patches welcome.

RDA in MATE's screensaver

Same with MATE's screensaver. If the MATE screensaver locks a MATE session running inside X2Go, it will offer a [ Disconnect X2Go ] button in the screensaver unlock dialog. See upstream PR #159.

While working on this code, I noticed another flaw in MATE screensaver that looks like a variant of CVE-2018-20681 [2]. MATE's screensaver reveals the desktop session's content when (a) resuming a suspend session and (non-critical IMHO, resuming requires user auth) or (b) when resizing the X2Go session window (critical, resizing requires local access to the X2Go client host only). See upstream issue #177 [3].

Remote Desktop Awareness

The concept of these features have been designed in a 3rd party shared library called RDA (Reemote Desktop Awareness) [4].

Testing it...

If you install MATE from Debian unstable (package will migrated in a few days to testing), then you can test this new feature.

On the server (for testing scenarios, server and client can be the same host):

$ sudo apt install x2goserver mate-desktop-environment

Make sure you get mate-panel 1.20.4-2 and mate-screensaver 1.20.3-3 installed (or newer versions).

On the client (recommending Debian testing):

$ sudo apt install pyhoca-cli

Then, on the client:

$ pyhoca-cli --server=<server> --port=<sshport> --user=<remote-user> --command=MATE

If you prefer, using X2Go Client (Qt GUI for X2Go) for testing this, then you can do that, as well, and click your way through the GUI to set up a session profile.

Future Prospects

All this RDA stuff is still work-in-progress and it is neither limited to X2Go nor limited to the MATE desktop environment. Please consider this implementation a proof of concept that may grow in the near and far future.

References