Installare il server vnc
apt-get install tightvncserver
Avviare
tightvncserver per impostare la password di accesso
creare un file con il codice di avvio del programma (es:
/home/user/.vnc/vncboot ):
#!/bin/sh
vncserver -geometry 1024x600 -depth 16 :1
Comandi necessari al file:
chown user:user vncboot
chmod 755 vncboot
chmod +x vncboot
Inserire nel file
/etc/init.d/rc.local subito dopo l'intestazione
sudo /home/admin/.vnc/vncboot
Reboot !
ALTRE PROVE:
Creare il file
/etc/init.d/vncboot contenente il seguente codice
### 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
#! /bin/sh
# /etc/init.d/vncboot
USER=admin
HOME=/home/admin
export USER HOME
case "$1" in
start)
echo "Starting VNC Server"
#Insert your favoured settings for a VNC session
su $USER -c "/usr/bin/tightvncserver :0"
;;
stop)
echo "Stopping VNC Server"
/usr/bin/vncserver -kill :0
;;
*)
echo "Usage: /etc/init.d/vncboot {start|stop}"
exit 1
;;
esac
exit 0
Dare i permessi 755 e poi caricarlo al boot
update-rc.d vncboot defaults