To login to your GNOME desktop session, you should use a vnc server to connect to GDM’s X session. It is not possible to do this when GDM uses wayland session.
Setup
You need to install and configure x11vnc. On debian:
# apt-get install x11vnc net-tools
# x11vnc -storepasswd
GDM must be configured to use X11.
/etc/gdm3/daemon.conf:
[daemon]
WaylandEnable=false
Usage
SSH into the box and launch x11vnc as GDM’s user. On debian:
# sudo -u Debian-gdm x11vnc -auth /run/user/$(id -u Debian-gdm)/gdm/Xauthority -display :0 -nopw
Then you can connect to the server from any vnc client and login to your user.
After login, you can relaunch x11vnc as your user to access your desktop:
# sudo -u username x11vnc -auth /run/user/$(id -u username)/gdm/Xauthority -display :1 -nopw
Leave a Reply