Setting up Remote Desktop in Raspberry Pi – Part 4

Remote Desktop

SSH is often all you need to control your Raspberry Pi, however sometimes it is useful to be able to remote control your Raspberry Pi using the mouse and seeing just what you would see on the screen of the Raspberry Pi. VNC (Virtual Network Connection) is a standard for doing just this. To use it, you have to install some software on your Pi. There are a number of VNC server applications, and the one we are going to use is called “tightvnc”.

Installing a VNC Server

Enter the following command,

You will be prompted to confirm installation by typing “Y‘ and finally when installation is complete, start the server:

You will be prompted to enter and confirm a password. The passwords are limited to 8 characters. Note that, this is the password that you will need to use to connect to the RaspberryPi remotely. There is no need to create a view only password, unless you have a specific need.

Adding Tightvnc to the startup

To have TightVNC start up automatically we need to create a new init file.

Add the below code in the file,

Change the Username ‘pi’ to whatever you have set for your Pi.

Set ownership, file permissions and run level with the below commands,

Use below commands to manually start and stop the VNC.

Connecting from VNC Client

There are many VNC clients available such as Real VNC Viewer, UltraVNC and so on. Download and install any of the VNC Client in your PC. The basic mandatory setting that you have put is the IP address of your Raspberry Pi and the VNC server port.
Enter the IP address and Port number of the server like this,
192.168.2.3:1
:1 is the port number that you set for the VNC Server in Raspberry Pi.

UltraVNC_Connect
Finally, the VNC window itself should appear. As with SSH, since this is working over your network, your Pi could be situated anywhere, as long as it is connected to your network


Comments

digxtech
or

Log in with your credentials

Forgot your details?