Learn: Access Raspberry Pi 4 with VNC
Learn: Access Raspberry Pi 4 with VNC
As soon as my Raspberry Pi 4 was un-boxed I rushed to get it setup and quickly became annoyed with the peripheral requirements. There is no way I was going to sacrifice precious space on my desk in order to access the GUI.
To combat the long-term need of an additional monitor, keyboard, and mouse I found that connecting to the Raspberry Pi with VNC Viewer remote access fit my needs exactly!
In this guide we will walk through all the steps necessary to get remote desktop (GUI) access. Once the setup is completed you will be able to connect with or without a monitor.
- Raspberry Pi 4 (amazon affiliate links help to support these guides)
- Latest Raspbian full (recommended)
- Monitor, Mouse, Keyboard for RPi (for now)
- ~10 minutes
Download/Configure VNC Viewer
First step is to setup VNC Viewer on the computer/mobile device that you will use when accessing your Raspberry Pi.
Download VNC Viewer from realVNC.com If you don’t have an account, (optional) I would recommend creating an account once this is installed.
RealVNC does offer paid products DO NOT pay or start a TRIAL. Instead, you can get a free download of VNC Viewer from the VNC For Raspberry Pi section of the “products” menu.
Once you download and install VNC Viewer for the desired OS, your workstation is ready to access another computer that is running the VNC Server. Next we will setup the Raspberry Pi 4.
Setting up the Raspberry Pi
If you have installed the full version of Raspbian, either manually, or with the help of NOOBS you are ready to continue. If you haven’t installed the OS on your Raspberry Pi, do that now.
Connect your Pi to a monitor (mini HDMI -> HDMI), mouse and keyboard. Turn it on and login if necessary.
From the Raspbian menu, select Preferences and Raspberry Pi Configuration.
If you want to eventually use your Pi remotely (with GUI), make sure that your Pi is configured to automatically login with desktop. Check out the troubleshooting guide at the end if you are still facing issues after setup.
Open the “Interfaces” tab and enable VNC using the radio button. This requires a restart to apply. Press “ok”. Now restart the Raspberry Pi.
Connecting with VNC
Once the Raspberry Pi has restarted you should notice the blue “VNC” icon located in the upper right hand corner of the Raspbian menu bar. This indicates that VNC is running and ready to be accessed.
Now, you can open a terminal and find the IP Address of the Raspberry Pi using the following command:
Go back to your workstation and open VNC Viewer, enter the IP Address of your RPi in the top of the VNC application.
If you’ve entered the correct IP Address, you will be prompted for your Raspberry Pi user credentials. All done! You should now be able to remote access your Raspberry Pi from this workstation or any other devices with VNC Viewer configured.
That’s it! Congratulations on making through this tutorial! Please take a moment to comment if you have any questions or issues. Some common troubleshooting tips can be found below.
“Cannot current show desktop”
This is pretty common when trying to access the Raspberry Pi when it’s not connected to a monitor by HDMI. By default, the device will boot with CLI if no monitor is detected.
Make sure that you’ve configured the Raspberry Pi to boot “to desktop” as demonstrated earlier in this tutorial. Also, you may have to change the resolution of the desktop; for some reason changing this from its default value resolves the issue.
To change default resolution, go back to your Raspberry Pi:
- Open “sudo raspi-config” from terminal
- Select option #7 (Advanced)
- Select option #A5 (Resolution)
- Pick any option other than default
- Finalize the changes and reboot
“The connection was refused”
In most cases this will occur if VNC is not started on the Raspberry Pi or the incorrect IP Address was used when trying to connect.
Check if VNC Server is running on the Raspberry Pi with the following command:
sudo systemctl status vncserver-x11-serviced
If VNC Server is not started, you can use the following command to configure VNC to start on the next reboot (and all after)
sudo systemctl enable vncserver-x11-serviced.service
- Raspberry Pi Pico W - First Thoughts - CodeTober August 5, 2022 at 1:37 pm
[…] to other Raspberry Pi devices, which we continue to discuss, you power the Pico W by either micro-usb or the GPIO pins […]
[…] mention it, but, I’m hopeful that Carbon is available for enthusiast microcomputers like the Raspberry Pi and Arduino families. I’m excited for Carbon and I really hope that with the initial support […]