How to setup VNC server on Raspberry Pi for remote access

by Remy Pereira on 27th February 2015

Once your raspberry pi is up and running, you may be running it headless without a screen, keyboard or mouse. If it is connected to your network, you can remotely access it by ssh and ssh is enabled by default. But if you are more comfortable using a graphical interface you can install a VNC (Virtual Network Connection) server on your Raspberry Pi.

There are several flavors around, one of them is the free TightVNC package which has the advantage of being cross­platform (Windows and Unix).

To install TightVNC server

Logon to Pi using a monitor or remotely over SSH and type

sudo apt-get install tightvncserver

This installs all the required packages. Now run the TightVNC server

tightvncserver

You will be prompted for a password and an optional read-only password.

Start a new VNC session by typing

vncserver :0

Install a VNC client on the machine you want to access Pi from. Now you are ready to connect to Pi.

Tips

Resolution, color depth etc can be specified on starting the session. Example: For full HD 24 bit resolution:

vncserver :0 -geometry 1920x1080 -depth 24

If you want more than one session run vncserver :1, vncserver :2 etc.,
Note:TightVNC creates a new desktop for each new session. If you want users to share the desktop then you need a different VNC server software.


Post a comment

Comments

Nothing yet..be the first to share wisdom.