
Above works just fine with lightdm and xfce. Other switches like "-noxdamage" and similar probably depend on what displaymanager or windowmanager you are running. "-allow 127.0.0.1" of course only binds it to localhost interface so you can only reach it from outside through a suitable (vpn-) tunnel, you probably want to list your localnet there, too. "-repeat" can be a little problematic sometimes and you want to probably leave that out On Debian (with lightdm) I run it like thisĮxecStart=/usr/bin/x11vnc -xkb -repeat -allow 127.0.0.1 -display :0 -auth guess -rfbauth /etc/X11/x11vnc.passwd -rfbport 5900 -forever -loop -o /var/log/x11vnc.log Of course you had to use type=forking because you tell it to fork by using "-bg". Had to deal with this a year ago - after I found out you cannot start x11vnc traditionally and simple with your displaymanager anymore in a systemd system. The -ncache 10 was suggested by the program in its log file, so I decided to give it a try. And -nofixes needed to be skipped else mouse pointers did not come across to the remote control side correctly. Without the service defined as that, the connection drops once authentication is successful. Type=forking was imperative from what I can see as x11vnc appears to fork once a connection successfully authenticates.

After issuing this command, you will notice that you are automatically logged out from the console session.

This solution successfully runs x11vnc at the Xubuntu login screen. To apply these changes, you have to kill the existing vncserver session (using vncserver -kill :1) and restart again the vnc server by issuing the command vncserver in the Terminal console. ExecStart=/usr/bin/x11vnc -auth /var/run/lightdm/root/:0 -display WAIT:0 -ncache 10 -forever -nevershared -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900 -xkb -norc -noxrecord -noxdamage -nomodtweak
