This is the tightvncserver init.d script, tightvncserver, in /etc/init.d
:
============
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: tightvncserver starts at boot time
# Description: Start tightvncserver connection service
### END INIT INFO
#
# set the USER variable for the VNC server
#
# Note: Starting the VNC Server on :1 means we need to connect to port 5901
#
# To install:
#
# sudo chown root:root /etc/init.d/tightvncserver
# sudo chmod 755 /etc/init.d/tightvncserver
# sudo update-rc.d tightvncserver defaults
#
#
export USER=pi
export HOME=/home/pi
eval cd ~$USER
case "$1" in
start)
su - $USER -c "/usr/bin/tightvncserver -geometry 1280x720 -depth 24 :1"
echo "Starting TightVNC server for $USER"
;;
stop)
pkill Xtightvnc
echo "TightVNC server stopped"
;;
*)
echo "Usage: /etc/init.d/tightvncserver {start|stop}"
exit 1
;;
esac
exit 0
============
Here is the ls -l:
-rwxr-xr-x 1 root root 918 Dec 13 14:02 tightvncserver
It will run when I type at the command prompt:
sudo ./tightvncserver start
But it does not run at boot time. I have done the command:
sudo update-rc.d tightvncserver defaults
Can anyone explain what is wrong?