I would like to be able to connect to my Loki desktop remotely. I have installed x11vnc but as soon as there is no display connected I can no longer access my desktop from the remote machine.

I am not sure what info is required to help anyone answer my question, but feel free to ask anything of me that may help.

Thanks, DM!

2 Answers 2


Did you try making it run at start up, make sure you've done all of this first to ensure the service is running.

You can also try running sudo service lightdm restart after ensuring that the VNC server is running.

If you are not able to make it work, you can also look at logs:

ls ~/.local/share/xorg/
cat ~/.local/share/xorg/Xorg.1.log (or whatever recent log is called)

Also, what is the output of xrandr when VNC is running? I'm assuming at some point the virtual monitor should appear...


For my headless elementary machines, I tend to set up the VNC server via LightDM. It requires the tigervnc server to be installed. You can configure it as follows:

Create a vncpasswd file:

sudo vncpasswd /etc/vncpasswd

Configure /etc/lightdm/lightdm.conf with the following contents:

command=Xvnc -rfbauth /etc/vncpasswd

Then restart the machine or restart lightdm, which will kill your session. VNC should then be listening on the port specified in the config file and you will be presented with the elementary greeter when you connect. Logging into the machine locally will log you out of your VNC session and vice versa.

  • 1
    I followed your suggestion and installed the tigervnc. Of the options returned from an apt search, I chose tigervnc-standalone-server. Now, I can see port 5900 listening under lightdm.(sudo netstat -panto |grep LIST) I can SSH with -L5900: ... My vnc client gets prompted for the password and then displays the Elementary login screen but once I enter that password. pouf. session closes. What did I miss?
    – Meta4
    Mar 3, 2020 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.