Raspbian – How to Run X11vnc on Startup

Let’s keep this short and sweet, here’s how to run x11vnc server on startup with your Raspberry Pi running the Raspbian OS. Obviously, if you don’t have x11vnc installed beforehand, then you’re a dumbass blankety blank blank and you should die.

Either SSH into the Pi (as pi) or open up a terminal and do one of the following:

If you want to connect via VNC without a password:

echo 'x11vnc -bg -nevershared -forever -tightfilexfer -nopw -display :0' > ~/.xsessionrc

Then start x11vnc by either rebooting or by just typing:

x11vnc -bg -nevershared -forever -tightfilexfer -nopw -display :0

If you want VNC to use a password, do the following while inserting your own password in between the single quotes:

mkdir ~/.vnc
x11vnc -storepasswd 'MyPasswd' ~/.vnc/passwd
echo 'x11vnc -bg -nevershared -forever -tightfilexfer -usepw -display :0' > ~/.xsessionrc

Then same as above, start x11vnc by either rebooting or by just typing:

x11vnc -bg -nevershared -forever -tightfilexfer -usepw -display :0
0Thumbs Up 0Thumbs Down

Leave a Reply