Settings Up VNC Viewer

Credit to this website: https://www.realvnc.com/en/connect/docs/raspberry-pi.html

Setting up VNC Viewer Raspberry Pi

VNC Server is included with Raspbian but you still have to enable it.

If you have an earlier version of Raspbian, or a different Linux distribution, you can install VNC Server yourself.

First, run the following commands to make sure you have the latest version:

sudo apt-get update
sudo apt-get install realvnc-vnc-server

If you’re already using an older version of VNC Server, restart it. If not, and you’re already booted into the graphical desktop, select Menu > Preferences > Raspberry Pi Configuration > Interfaces and make sure VNC is set to Enabled.

Alternatively, run the command sudo raspi-config, navigate to Interfacing Options > VNC and select Yes.

From now on, VNC Server will start automatically every time you boot your Raspberry Pi.

Remote Access through IP address

By default, VNC Server remotes the graphical desktop running on your Raspberry Pi. However, if your Pi is headless (not plugged into a monitor) or not running a graphical desktop, VNC Server can still give you graphical remote access using a virtual desktop.

Note you can also install VNC Viewer on your Raspberry Pi, in case you want to control a remote computer (or another Raspberry Pi!). To do this, use the Recommended Software program, or run the command sudo apt-get install realvnc-vnc-viewer.

 

Remote Access through Cloud Connection

Cloud connections are convenient and encrypted end-to-end, and highly recommended for connections over the Internet. There’s no firewall or router reconfiguration, and you don’t need to know the IP address of your Raspberry Pi, or provide a static one.

You’ll need a RealVNC account; it’s completely free to set up and only takes a few seconds. We’ll give you a special version of our Home subscription that enables both cloud and direct connectivity, and also in-session features such as system authentication, file transfer, printing and chat.

Steps

  1. Sign up for a RealVNC account by entering your email address in the box on this page, and following the instructions.

  2. On your Raspberry Pi, select Licensing from the VNC Server status menu, choose Sign in to your RealVNC account, and enter your new account email and password:

    ../_images/raspberry-pi-cloud-signin.png

  3. Then, go to options –> Authentication. Change to VNC password and enter your desired password.
  4. On the device you will use to take control, run VNC Viewer and sign in using the same account credentials.

  5. In VNC Viewer, a connection to your Raspberry Pi automatically appears under the name of your team. Simply tap or double-click to connect:

    ../_images/raspberry-pi-cloud-connect.png

  6. Done

 

In case you clone your raspberry pi

You need to reset the VNC by running this commands:

sudo systemctl stop vncserver-x11-serviced
sudo rm -rf /root/.vnc
sudo systemctl start vncserver-x11-serviced

Then repeat the steps 1 until 6 again.