I would like to be able to connect to my computer running Ubuntu 18.04 remotely via a VNC client. I am using x11vnc server-side.

Here is how I start my initial x11vnc session:

sudo x11vnc -rfbauth ~/.x11vnc/passwd -forever -bg -sshxdmsvc -rfbport 5900 -create -auth /run/user/123/gdm/Xauthority -display :0

I found the -auth argument by running the command

ps wwwaux | grep auth

This works properly: with that configuration, I do manage to connect to the vnc server over SSH, and that displays me my login screen managed by gdm3. However, whenever I do enter my password, the screen turns black. When I run the command w, I get:

skasch   :1    :1      10:13   ?xdm?   12.27s  0.00s  /usr/lib/gdm3/gdm-

And if I stop the x11vnc and restart it with the following configuration:

x11vnc -rfbauth ~/.x11vnc/passwd -forever -sshxdmsvc -rfbport 5900 -create -display :1

then I can correctly connect over SSH to my actual personal session.

However, it is inconvenient and impractical to have to run two different x11vnc daemons to login then connect to my personal session; is there a way to configure x11vnc or gdm3 to allow me to create a single VNC daemon to both login and display my session? This was working properly with Ubuntu 16.04 (and I believe it's because it was relying on lightdm).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.