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).