If you are like me, you rarely, if ever, plug a monitor and keyboard into your Raspberry Pi. Instead you run everything from a network connection. Commonly this is just a terminal and SSH connection from a desktop computer like a PC or Mac.
However, there are times when in it useful to access the Raspberry Pi Desktop and instead of reaching for the monitor, I instead reach for a tool called VNC - or Virtual Network Computer. In earlier days, you needed to install VNC on the Raspberry PI, but these days in 2020, it’s built-in. Like a lot of built-in tools you have to enable it first to use it.
I’ll describe below, how to enable VNC and connect to it from a remote computer. This whole setup can be done on the Raspberry Pi from the command line - after all, what’s the point if you couldn’t?
First of all login to your Raspberry Pi over SSH. Then type the following command:
This will call up the Raspberry Pi command line version of the configuration screen.
Then scroll down to “5 Interfacing Options” and the following screen comes up:
Obviously the one we want here is “P3 VNC” and then enable it.
It flashes to the command line and then returns with this screen:
Then reboot and you are good to go.
Once you have VNC enabled in the Raspberry Pi, then you need a VNC Viewer on the computer you want to use to view the Raspberry Pi. You can download the VNC Viewer for your platform from the RealVNC website (is there a FakeVNC website somewhere?). These days they want you to create an account - don’t worry you won’t get charged for anything - and then once you have you can download and install the VNC Viewer.
To connect to the Raspberry Pi you need to know the IP Address of your Raspberry Pi. Armed with that, the following steps shows how to connect to the Raspberry Pi. The screenshots are from a Mac, but the method is the same on other platforms.
Open up VNC Viewer on your computer and type in the IP address of your Raspberry Pi.
When you first run it, you will get a message about authentication and certificate - just click OK, then you will get to the login screen:
Initially (if you haven’t changed the default raspberry pi user and password) this will be “pi”and “raspberry”. The first time you log in you will see a very compact and bijou desktop of a whopping 720 x 480. You can easily change this.
Cute though the initial desktop may be, it’s not very useful as a GUI. To change the resolution (and this will stick for when you next connect), go to the Raspberry Pi ->Preferences ->Raspberry Pi Configuration.
Select the display tab and “Set Resolution” and set it to something that seems sensible to you.
And then Reboot and VNC will automagically reconnect with the new resolution:
New connection and resolution :
Your email address will not be published. Required fields are marked *