banner VNC raspberry pi os bookworm

Getting Started With VNC on Raspberry Pi (Bookworm Update)

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

VNC is a tool that allows you to get remote desktop access from another computer. On Raspberry Pi, using VNC is one of the easiest ways to get remote control. If you use Raspberry Pi OS, VNC is preinstalled so you only have to enable it to get started. Let’s see how to use it.

The first step is to enable VNC on Raspberry Pi OS (via the system configuration or raspi-config), then install the client on a computer, and type the IP address of the Raspberry Pi to get connected to it.

But don’t worry, I’ll explain all these steps in detail, so you won’t fail. You are in the right place – just keep reading to learn everything about VNC on Raspberry Pi.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Enable the VNC Server on Raspberry Pi

Depending on the operating system and version you use, enabling VNC on your Raspberry Pi might be slightly different. Let’s start by making sure it’s enabled on your system.

On Raspberry Pi OS

If you have Raspberry Pi OS installed on your Pi, it will be straightforward, as VNC is pre-installed on any version so you’ll have to enable it to use it (it’s disabled by default, for security reasons).

From the Desktop Environment

If you can get access to the desktop environment of your Raspberry Pi, here are the steps to enable the VNC server:

  • Open the main menu.
  • Go to Preferences > Raspberry Pi Configuration.
  • In the Interfaces tab, find the line about VNC:
    activate vnc raspberry pi configuration on desktop
  • The interface can be slightly different depending on your version, but basically, it’s just a checkbox to enable it.
  • Once done, click on “OK” to apply the changes.

A few seconds later, VNC is enabled, and you can move to the next part to install VNC on your computer.

With raspi-config

If you don’t have access to the graphical interface (for example if you are using SSH, or don’t have a keyboard/mouse on the Pi), you can use raspi-config instead:

  • Open a session on the Raspberry Pi, and get to the command line.
    You can also use the terminal app on the desktop if you want, even if there is no real reason to do this instead of the previous method.
  • Type the command:
    sudo raspi-config
  • Go to the Interfaces submenu and choose VNC:
    raspi-config enable VNC
  • Confirm that you want to enable it.
  • Quit raspi-config.

After doing this, VNC is enabled right away, and you can start using it (scroll to the VNC client installation part of this tutorial).

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now
Prefer reading without ads and popups?
Members get an ad-free version of every guide, plus exclusive project support.
Join the Community | Sign In

Note: Want to see how to remote control your Pi with VNC, TeamViewer, or other options? I have a video lesson on this topic just for community members. Join here to watch, and get access to 30+ other lessons for Raspberry Pi!

On Other Systems

Just a quick word about the other systems. Raspberry Pi can run with many alternatives to Raspberry Pi OS (check my favorites here). It’s possible to use VNC on almost all of them, but the procedure is not as straightforward.

While many VNC tools are available for free, not all of them are. What I recommend is to use the package manager on your distribution and search for any VNC package included in the default repository.

Something like:
sudo apt search vnc

If you can find a server package for VNC, use the same app on your computer. For example, on Ubuntu and Manjaro, you can easily install TightVNC on the Raspberry Pi and install TightVNC viewer on your computer to access it.

TigerVNC is another alternative you can try, especially for Red Hat and Arch-based distributions. As we’ll use it for Raspberry Pi OS, it might be a good idea to install this version too, so you can follow along in the next part.

The protocol and apps are similar, but they are generally not compatible with one another. So make sure to use the same client as your server in the next steps.

By the way, even if the Raspberry Pi doesn’t run on Raspberry Pi OS, it’s often possible to install TigerVNC on it anyway, like on Ubuntu: Setting Up TigerVNC Server on Ubuntu: A Beginner’s Tutorial.

Quick note: If you find it hard to remember all these commands, I’ve put them all on a one-page cheat sheet. You can download it for free here so you have it handy whenever you're working on a project.

Install the VNC Client on Your Computer

Once the server part is installed and enabled on the Raspberry Pi, we can switch to the computer. We just need to install the VNC viewer app to remote access the Raspberry Pi from there.

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Note: I’m giving you the instructions for TigerVNC, that seems the best option right now with the latest releases of Raspberry Pi OS. Just know that you can now also use the RealVNC client for free.

Or if you installed a specific VNC server instead, it’s easier to use the client from the same software (like TightVNC).

That said, let’s install TigerVNC on your computer.

Linux Installation

If you’re lucky, TigerVNC might be available in your package manager or application store. You should probably start there.

For example, on Ubuntu, it’s available in the Ubuntu Software app:
ubuntu tigervnc search

And on Debian, you should find it with APT:
debian tigervnc install from command line

In these cases, simply install the TigerVNC viewer like any other app, and you’ll be ready to go.
So, for example:
sudo apt install tigervnc-viewer

Windows & Other Systems

On Windows, it’s a bit less intuitive. The official website is not that user-friendly, and we can easily get lost in the Sourceforge folders.

Here are the steps to install TigerVNC binaries manually:

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Check this: Looking for a fun challenge? Start building your first Raspberry Pi robot!

  • Go directly to the Sourceforge project here.
  • Find the latest version available and click on it:
    tigervnc binary versions
  • Now click on the file corresponding to your system and architecture.
    For example, I downloaded “tigervnc64-<version>.exe”.
    tigervnc binary downloads
    Several files are listed. You have the 32 and 64 bit versions, and then the ones with “winvnc” in the name are servers, adding the ability to take control of your computer.
    If you just want to access the Raspberry Pi (not the computer), download the one named “tigervnc64-<version>.exe”.
  • Once the file downloaded, double-click on it to install it or start it, like any other executable.

Let’s see how to use this now that the prerequisites are installed.

Use VNC to Control Raspberry Pi Remotely

Once the VNC viewer is installed on your computer, you can enter the IP address of the Raspberry Pi, type your login and password and get access to the full interface remotely.

Let’s learn how to do this.

Find the Raspberry Pi IP Address

Before anything else, you need the Raspberry Pi IP address.
If you don’t know what I’m talking about, I recommend reading this article first, where I explain everything and different methods to find it.

But the short version is that you can hover the network icon in the top-right corner, or use the following command to get it:
ip a

find ip address raspberry pi

The format of the IP address is something like AAA.BBB.CCC.DDD. On my screenshot, it’s 192.168.222.8 for example.

Create a New Connection

You can then open the VNC viewer to create a new connection.
The interface will be slightly different depending on your operating system (and the VNC client you use), but basically, the steps are:

  • Open your VNC viewer application.
  • Create a new connection by typing the Raspberry Pi IP address.
    vnc viewer enter new connection
    You can play with the “Options” section if needed, but in most cases the default are just fine.
  • Click on “Connect” to start the connection
  • Click “Yes” to accept the server fingerprint on the first connection
  • Then enter the username and password to access the current session:
    tigervnc authentication
    It’s the Raspberry Pi user and password, so it depends on your settings.
  • You should then get access to the full interface of the Raspberry Pi:
    desktop via vnc

And that’s it. After that, you’ll get access to the full desktop environment of your Raspberry Pi, and can do whatever you want from the comfort of your main computer.
Check the following part if you experience any issues, I answer the most common questions.

Note: On older releases of Raspberry Pi OS, you might get an error related to the ZRLE compression, and get disconnected quickly. You can avoid it by disabling the compression in the settings, using “Raw” for example (see related question below).


🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Prefer videos over reading? The RaspberryTips Community members get exclusive video lessons every month. Join now and watch them all right away. Get instant access.

Related Questions

How to fix the error: “Exception on worker thread: ZRLE decode error”?

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

This error only happens on older releases of Raspberry Pi OS (“Bullseye” for example), and a workaround is to disable the compression in the connection options.

zrle decode error vnc
  • Click on Options below the IP address field.
  • In the Compression tab, uncheck Auto-select and select Raw instead.
    vnc compression encoding
  • Click on Ok to save the changes, and try again.

It should work fine after that.

What’s the default username and password for VNC?

The username and password for a VNC connection are the same as for a desktop connection. On an old Raspberry Pi OS version, it might be “pi” and “raspberry” for example. Or the user you created on the first boot in other cases.

If needed, you can check my other tutorials on how to recover a lost password, or how to create new users on Raspberry Pi.

How to fix the error: “Cannot currently show the desktop” with VNC?

Raspberry Pi OS used to not start the desktop environment if there was no HDMI cable plugged into the Raspberry Pi. If you boot without plugging one and try to access it via VNC, you may get this error: “Cannot currently show the desktop.”

vnc cannot show desktop error

To fix this, keep a monitor plugged in all the time, or start VNC manually via SSH with:
vncserver
You may need to specify a different port after that, for example: IP_ADDRESS:1 instead of IP_ADDRESS.
The port is mentioned in the command output:

vnc monitor display which one

How to change the default resolution in VNC?

When a monitor is plugged in, the VNC server will start with the corresponding resolution. But it’s not always ideal, especially if you have a small screen on it, but a bigger screen on your computer.

To fix this, you can go to the system configuration and change the “Headless resolution” in the “Display” tab. You have the same thing in raspi-config, under “Display options” > “VNC resolution”.

Another thing you can try is to change the options on the VNC viewer. In the advanced settings for the connection, there is a list where you can choose to adjust the resolution to the window or use a percentage (scaling).

vnc scaling display options

Whenever you’re ready, here are other ways I can help you:

Test Your Raspberry Pi Level (Free): Not sure why everything takes so long on your Raspberry Pi? Take this free 3-minute assessment and see what’s causing the problems.

The RaspberryTips Community: Need help or want to discuss your Raspberry Pi projects with others who actually get it? Join the RaspberryTips Community and get access to private forums, exclusive lessons, and direct help.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts