How to use VNC to Remote Desktop to the Raspberry Pi
VNC stands for Virtual Network Computing and it allows us to remote into our Raspberry Pi and view a graphic interface of our desktop environment over the network. You can use your mouse and keyboard over the network and have full remote access to the Raspberry Pi over your network. You can even forward your VNC connection over your router or VPN and access your Raspberry Pi from anywhere in the world. We will be using a program called ‘RealVNC‘ to access our Raspberry Pi from any computer on the network. Our Raspberry Pi will act as the server and the computer running RealVNC will be the client.
When you connect to your Raspberry Pi using the VNC software you will get a Remote Desktop view that opens in a new Window and you can minimize and maximize it. You can also set up your Raspberry Pi without a monitor and use the Remote Desktop connection as your monitor. Installing the VNC on your Raspberry Pi is very easy and doesn’t require much configuration since Raspbian sets up VNC pretty easy right out of the box.
To use VNC to access our Raspberry Pi Remotely
You will need the following:
I will assume you are running Raspbian on your Raspberry Pi. I have tested this procedure with a Raspberry Pi running Stretch, but it should work for older and new builds. If there are any issues just leave a comment below.
You’ll need access to your Raspberry Pi to run some commands. You can also run these commands over SSH if you have enabled SSH in case you Raspberry Pi is headless and running without a monitor. You can enable SSH by following the tutorial here.
After getting access to your Raspberry Pi open up the terminal and run the following commands:
sudo apt-get update
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
This will install the RealVNC server which will run on our Raspberry Pi. After you install RealVNC we simply need to enable the VNC server from the Raspi-Config screen. In your terminal type the following command:
Once the Configuration screen pops up select Interfacing Options, select VNC and then Enable the VNC.
You should now have the VNC server running on your Raspberry Pi. Now we can connect to our Raspberry Pi from any computer on our network and interact with it. To connect to your Raspberry Pi remotely simply open the RealVNC client on your computer and type in the IP Address of your Raspberry Pi. Use the command below to find the IP Address of your Raspberry Pi on your network:
Once you get the IP Address of your Raspberry Pi plug it into your RealVNC client and connect to the Raspberry Pi. It will ask you for the username and password. It is the same username and password that you use to login to the Raspberry Pi. Below is an example of my Raspberry Pi.