VNC Server
Usually raspi stays hidden, doing it’s job, controlled through web, hdmi cec or other various interfaces. Rarely it’s keyboard or mice. Although there comes time that we need to do something that requires mice and keyboard connected and there is none available or it’s difficult to do so. The perfect solution for you is VNC Server – remote desktop for your raspi.
This tutorial was tested on raspbian wheezy, I’m planning to build a 24/7 raspi server and thought about remote desktop for easy gui configuration.
If you are not convinced yet (remote desktop, that all ;) ) visit ThightVNC site. Meanwhile all convinced updates apt-get:
sudo apt-get update sudo apt-get upgrade |
Configure tightvnc password:
tightvncserver |
When asked Would you like to enter a view-only password (y/n)? answer y if you need to give to someone just a viewing capabilities without control. Otherwise answer n.
Run server with:
vncserver :0 -geometry 1280x800 -depth 16 |
If you have already running other X instances change 0 in above command to 1 or higher. Download VNC viewer from http://tightvnc.com/download.php and run it. Fill in the blanks with appropriate values:
Hit connect, enter your password and test if works properly:
If you are happy with result let’s prepare init script:
sudo nano /etc/init.d/tvnc |
Make necessary corrections if you need to and paste below script. This is a improved script from elinux.org:
# Provides: tvnc # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Short-Description: Start VNC Server at boot time # Description: Start VNC Server at boot time. USER=pi HOME=/home/pi export USER HOME echo "Starting VNC Server" #Insert your favoured settings for a VNC session su pi -c '/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565' stop) echo "Stopping VNC Server" /usr/bin/vncserver -kill :0 echo "Usage: /etc/init.d/tvnc {start|stop}" esac exit 0 |
Follow standard procedure:
sudo chmod 755 /etc/init.d/tvnc |
Then:
sudo update-rc.d tvnc defaults |
Reboot and check if tightvnc starts and works.
That’s all. Thanks for reading and don’t forget to comment and share your experience.
Continue reading here: Installing 3G Modem
Was this article helpful?