sudo vi /etc/hostname
sudo reboothostname --fqd
Unix, Linux, JBoss, Websphere, Ant, Python, Oracle DB, Arduino, Raspberry Pi.
sudo nano /etc/init.d/tightvncserverEnter the following details:
#!/bin/sh
# /etc/init.d/tightvncserver
VNCUSER='pi'
case "$1" in
start)
su $VNCUSER -c '/usr/bin/tightvncserver :1'
echo "Starting TightVNC Server for $VNCUSER "
;;
stop)
pkill Xtightvnc
echo "TightVNC Server stopped"
;;
*)
echo "Usage: /etc/init.d/tightvncserver {start|stop}"
exit 1
;;
esac
exit 0
Give the script executable permission:sudo chmod 755 /etc/init.d/tightvncserverWe can now start or stop the service manually:
sudo /etc/init.d/tightvncserver start
sudo /etc/init.d/tightvncserver stopBut let's make Tight VNC Server start every time the Raspberry Pi starts up:
sudo update-rc.d tightvncserver defaultsNow just power off the Raspberry Pi. Make sure it's connected to the network and power back on. You can now connected across the network using the VNC Viewer!