RealVNC is a software that allows you to remotely control your Raspberry Pi from another device, such as a computer, tablet, or smartphone. Since the Raspberry Pi has become commonplace everywhere in everything from industrial use to education it’s necessary that we should be able to control it from anywhere. This means you can access and control your Raspberry Pi without needing a dedicated monitor, keyboard, or mouse. It is especially useful when working on projects or coding, as you can interact with the Raspberry Pi from anywhere within your home or workspace.
I. Prerequisites
Before getting started, make sure you have the following:
- A Raspberry Pi 5 running the latest version of Raspberry PiOS
- A device (PC, Mac, smartphone, or tablet) where you will install VNC Viewer
- Both the Raspberry Pi and the device should be connected to the same network
- Basic familiarity with using the Terminal on Raspberry Pi
II. Enabling VNC on the Raspberry Pi 5
To use RealVNC, you first need to enable it on the Raspberry Pi.
Step 1 – Open the Raspberry Pi Configuration
- On the Raspberry Pi desktop, go to the Raspberry Pi Menu (the small raspberry icon in the top-left corner).
- Choose Preferences and then select Raspberry Pi Configuration.
Step 2 – Enable VNC
- In the Raspberry Pi Configuration window, click on the Interfaces tab.
- Look for VNC and enable it by checking the box next to it.
- Click OK to save your changes.
- After enabling it, a VNC icon should appear at the top-right corner of your desktop, near the clock and network icons.
Step 3 – Start the VNC Server
To check that VNC is running, hover over the VNC icon. You should see an IP address (for example, 192.168.1.100). You will need this address to connect to your Raspberry Pi from another device.
IV. Setting up VNC Viewer on Another Device
Next, you need to install VNC Viewer on the device that will control your Raspberry Pi.
Step 1 – Install VNC Viewer
- Download VNC Viewer from the RealVNC website. It is available for Windows, macOS, Linux, Android, and iOS.
- Install the software on your device.
Step 2 – Open VNC Viewer
- Once installed, launch VNC Viewer.
- In the address bar of VNC Viewer, type the IP address of your Raspberry Pi (the one you saw when hovering over the VNC icon).
Step 3 – Connect to Raspberry Pi
- After entering the IP address, click Connect.
- A window will appear asking for a username and password. The default credentials for a Raspberry Pi are:
- Username – pi
- Password – raspberry (unless you have changed this).
- After entering these details, click OK. You should now see your Raspberry Pi desktop on your device, and you can control it just as if you were sitting in front of it.
V. Using VNC to Control the Raspberry Pi
Now that you’re connected, you can fully control your Raspberry Pi from the device you’re using. You will be able to open programs, run the Terminal, and manage files remotely.
VI. Advanced Configuration
There are other optional settings you could configure for better control and usability.
Change the Screen Resolution for VNC
Sometimes, the VNC display may appear too small or large. To fix this, open the Raspberry Pi Configuration again, go to the Display tab, and adjust the resolution. Pick a resolution that matches your monitor or device.
Accessing the Raspberry Pi from Outside the Local Network
If you want to access your Raspberry Pi from outside your local network (for example, from a different location), you need to set up cloud connectivity.
- Create a RealVNC account by signing up on their website.
- Sign in to your RealVNC account on both the VNC Viewer and VNC Server.
- In the VNC Server on the Raspberry Pi, enable Cloud Connectivity by going to Menu – Options – Connections and signing in with your RealVNC account.
Once this is done, you can access your Raspberry Pi from anywhere with an internet connection.
VII. Example Commands for Raspberry Pi via VNC
While using VNC, you can still perform tasks on the Raspberry Pi through the Terminal. Here are some common commands you might need:
Update the System
To make sure your Raspberry Pi OS is up to date, run this command:
sudo apt update && sudo apt upgrade
Reboot the Raspberry Pi
To restart your Raspberry Pi remotely, use this command:
sudo reboot
Install Software
To install a new application or package, use the following command:
sudo apt install [software-name]
Replace `[software-name]` with the name of the software you want to install, such as `python3` or `vim`.
VIII. Troubleshooting Common Issues
VNC Viewer cannot connect – Ensure that both your Raspberry Pi and the other device are on the same network, and check if VNC is enabled on the Raspberry Pi.
Incorrect IP Address – To find your Raspberry Pi’s IP address, hover over the VNC icon or type the following command in the Terminal on the Raspberry Pi:
hostname -I
Low Resolution – If the display is too small, change the resolution in the Raspberry Pi Configuration under the Display tab. Using RealVNC makes working on your Raspberry Pi 5 much easier by allowing you to control it from any device. This can save you time and effort, especially when working on coding or project tasks. By following this guide, your students will be able to set up and use RealVNC effectively, opening up more flexibility and possibilities with their Raspberry Pi projects.








