Home / Linux Admin /
sudo apt-get update && sudo apt-get upgrade -ysudo apt-get install x11vnc vnc4serversudo x11vnc -display :0 - the same display as is shown on the server's local monitor.-auth guess - easy mode-auth /var/gdm/:0.Xauth
ps wwaux | grep auth and look for the string after -auth to get the actual location of the xauth filesudo apt-get update && sudo apt-get upgrade -ysudo apt-get install tightvncservertightvncservervncserver :0 -geometry 1920x1080 -depth 24/etc/init.d/
sudo nano /etc/init.d/vncbootPaste in the following text:
#!/bin/sh
### BEGIN INIT INFO
# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.
### END INIT INFO
USER=root
HOME=/root
export USER HOME
case "$1" in
start)
echo "Starting VNC Server"
#Insert your favoured settings for a VNC session
/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565
;;
stop)
echo "Stopping VNC Server"
/usr/bin/vncserver -kill :0
;;
*)
echo "Usage: /etc/init.d/vncboot {start|stop}"
exit 1
;;
esac
exit 0
sudo chmod 755 /etc/init.d/vncbootsudo update-rc.d /etc/init.d/vncboot defaultsthis document last modified: July 07 2018 02:00
Home / Linux Admin /