The following instructions will install a VNC
server that will connect to the primary desktop display. This assumes that you already have a desktop installed and running (LXDE, XFCE, etc.). The VNC service will autostart when the RaspberryPi boots up.
1. Install x11vnc
1 | sudo apt-get install x11vnc |
2. Set password. You will be asked to enter it twice.
1 | x11vnc -storepasswd |
3. Create the autostart folder (if it doesn’t already exist)
1 | mkdir -p ~/.config/autostart |
4. Create the autostart entry as ~/.config/autostart/x11vnc.desktop
1 2 3 4 5 6 7 8 9 | [Desktop Entry] Encoding=UTF-8 Type=Application Name=X11VNC Comment= Exec=x11vnc -forever -usepw -display :0 StartupNotify=false Terminal=false Hidden=false |
5. Start the x11vnc
process manually
1 | x11vnc -forever -usepw -display :0 |