Talk:RPi VNC Server

Just a note to say that although this set-up worked beautifully, it meant that I was always VNC'ing in as root. By using su, I could run as any user, e.g.:


 * 1) BEGIN INIT INFO
 * 2) Provides:             vncserver
 * 3) Required-Start:       $remote_fs $syslog
 * 4) Required-Stop:        $remote_fs $syslog
 * 5) Default-Start:        2 3 4 5
 * 6) Default-Stop:         0 1 6
 * 7) Short-Description:    Start VNC Server at boot time
 * 8) Description:          Start VNC Server at boot time
 * 9) END INIT INFO


 * 1) !/bin/sh

export USER=root export HOME=/root export RUN_USER=pi

case "$1" in start)    echo "Starting VNC Server"    su - $RUN_USER -c "/usr/bin/vncserver :1 -geometry 1280x1024 -depth 24"    ;;

stop)   echo "Stopping VNC Server"    su - $RUN_USER -c "/usr/bin/vncserver -kill :1"    ;;

*)   echo "Usage: $0 {start|stop}"    exit 1    ;; esac

exit 0