I'd like to be able to login to my remote Ubuntu 22.04 and see the Desktop as shown on that machine. (I know how to create a vncserver
with a separate desktop instance).
Built-in Remote Desktop
When I try with the built-in Remote Desktop
it works as long as the user is logged in, the screen isn't locked, and there is a physical screen attached. Requiring the user to be logged in is fine for me, but screen not locked means I can't login remotely after a while, and the "physical screen attached" requirement means I it only works when my KVM switch has the Ubuntu machine active, which also doesn't work for me.
Otherwise I get one of these error messages:
Failed to record monitor: GDBus.Error:org.freedesktop.DBus.Error.Failed: Unknown monitor
Failed to start remote desktop session: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Session creation inhibited
But I want to be able to log in and see my desktop when the screen is locked and the monitor disconnected (due to the KVM).
The screen locked situation can be handled by this gnome extension: Allow Locked Remote Desktop - GNOME Shell Extensions, so now only the monitor disconnected issue remains, and for that, I've posted this issue: Failed to record monitor: GDBus.Error:org.freedesktop.DBus.Error.Failed: Unknown Monitor (using KVM switch) (#171) · Issues · GNOME / gnome-remote-desktop · GitLab.
x11vnc
and x0vncserver
So I tried with x11vnc
and x0vncserver
. And they have different problems as outlined in: Why do both x11vnc and x0vncserver fail in similar ways in Gnome Ubuntu 22.04?
The real question
But this question is: Is there any easy way to get sharing of the "real" desktop with Gnome under 22.04 that works even if the screen locks and/or the monitor gets disconnected due to the KVM switch, ideally under Wayland (since that is where we're heading).
Is the situation better in future Ubuntu releases?
What about xrdp
?
xrdp
won't work for me, because as I state in the very first sentence:
...and see the Desktop as shown on that machine
xrdp
only works if the user is not logged in locally (which I always am).
Related questions
These questions don't address my requirements of seeing the local already-logged-in desktop and that works with the monitor being disconnected due to the KVM switch:
- Maintaining RDP connection to Ubuntu after Ubuntu Screen times out (goes black) Here the solution is to install "Allow Locked Remote Desktop" which I already mention. It doesn't tackle the "physical screen attached" requirement.
- Connect when Remote Desktop is on login screen or screen locked (without autologin) Here the answer is either "Allow Locked Remote Desktop" or
xrdp
(both covered above). - Ubuntu 22.04 remote desktop headless? Answer suggests using
xrdp
(covered above).