User Tools

Site Tools


raspberry_pi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
raspberry_pi [2013/02/17 21:25]
sgripon [Remote display with VNC]
raspberry_pi [2013/02/22 20:53] (current)
sgripon
Line 25: Line 25:
   vncserver :1 -name RasPi -depth 16 -geometry 1368x768   vncserver :1 -name RasPi -depth 16 -geometry 1368x768
    
 +===== Start VNC server at boot =====
 +
 +Create a script in /​etc/​init.d:​
 +
 +  sudo nano /​etc/​init.d/​vncserver
 +
 +With this content:
 +
 +<​code>​
 +#! /bin/sh
 +# /​etc/​init.d/​vncserverd
 +
 +### BEGIN INIT INFO
 +# Provides:​ vncserver
 +# Required-Start:​ $remote_fs $syslog
 +# Required-Stop:​ $remote_fs $syslog
 +# Default-Start:​ 2 3 4 5
 +# Default-Stop:​ 0 1 6
 +# Short-Description:​ VNC server
 +### END INIT INFO
 +
 +VNCUSER='​pi'​
 +
 +case "​$1"​ in
 +        start)
 +                echo -n "​Starting vncserver..."​
 +                su $VNCUSER -c '/​usr/​bin/​vncserver :1 -name RasPi -depth 16 -geometry 1368x768'​
 +                echo -n "​Starting VNCServer for $VNCUSER [OK]"
 +                ;;
 +        stop)
 +                echo -n "​Stoping vncserver..."​
 +                su $VNCUSER -c '/​usr/​bin/​vncserver -kill :1'
 +                echo -n "​[OK]"​
 +                ;;
 +        restart)
 +                $0 stop
 +                sleep 5
 +                $0 start
 +                ;;
 + *)
 + echo "​Usage:​ /​etc/​init.d/​vncserverd {start|stop}"​
 + exit 1
 + ;;
 +esac
 +
 +exit 0
 +
 +</​code>​
 +
 +Then give the credentials and update-rc :
 +
 +  sudo chmod 755 /​etc/​init.d/​vncserverd
 +  sudo update-rc.d vncserverd defaults
 +  ​
 +
raspberry_pi.1361132756.txt.gz ยท Last modified: 2013/02/17 21:25 by sgripon