Raspberry PI – automatically run x11vnc

Setup x11vnc server to start automatically on Raspbian.

If you already have x11vnc server working on Raspberry Pi but you have to start it manually every time you reboot your Pi, here’s how you can make it start automatically:

Open the terminal, or login via SSH and run this commands:
# login as super user
sudo su
# edit start up script
nano /etc/rc.local
# add the command that can start x11vnc (explain)
sudo -u pi /usr/bin/x11vnc -find

The command runs x11vnc as user pi (default user on Raspbian) and uses -find argument to let x11vnc guess the display an xauthority method. Worked like a charm for me, hope it will help others too.

Not sure if required, but I have x11vnc settings exported to file ~/.x11vncrc. You can do this via x11vnc UI.