sudo su
Update system:
apt-get update -y && apt-get upgrade -y
Install x11vnc server:
apt-get install x11vnc -y
Configure password for VNC server:
sudo x11vnc -storepasswd /etc/x11vnc.pass
Create startup service:
cat > /etc/init.d/x11vnc << EOF
#!/bin/sh
case "\$1" in
start)
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -ncache 10 -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
echo "x11vnc Started"
;;
stop)
pkill x11vnc
echo "x11vnc Terminated"
;;
*)
echo "Usage: /etc/init.d/x11vnc {start|stop}"
exit 1
;;
esac
EOF
Set file executable:
chmod 755 /etc/init.d/x11vnc
Update startup situation:
update-rc.d x11vnc defaults
Reboot or start VNC server immediately:
/etc/init.d/x11vnc start
Now you can use TightVNC viewer to connect to your raspberry pi IP address.For example
192.168.88.90:0
No comments:
Post a Comment