How to set VNC resolution on Raspberry Pi

One of the most common ways for users to access and administer their Raspberry Pi is via a VNC connection. VNC allows users to control their Raspberry Pi remotely, and interact with the desktop environment as if they were sitting directly in front of the Raspberry Pi, with a monitor and other peripherals plugged in. In reality, the Raspberry Pi needs nothing more than an Ethernet or Wi-Fi connection to facilitate VNC connections and full access to the system’s desktop.

The only problem you might encounter is if you connect via VNC and notice that the resolution is either too small or too large. This will make your desktop and application windows look the wrong size and may cause your picture to seem warped. The solution is to adjust the VNC resolution. In this tutorial, you will see how to adjust the VNC resolution on a Raspberry Pi.

In this tutorial you will learn:

  • How to set headless resolution (for VNC connection) via GUI and command line on Raspberry Pi
How to set VNC resolution on Raspberry Pi
How to set VNC resolution on Raspberry Pi
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Raspberry Pi
Software VNC
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Set VNC resolution on Raspberry Pi step by step instructions




Setting the VNC resolution on your Raspberry Pi can be done either via the desktop GUI or from command line. We will go over both methods in the sections below. Feel free to choose whichever method is most convenient for you.

Set VNC resolution via GUI

  1. Headless resolution can be configured via the GUI’s menus via Preferences > Raspberry Pi Configuration.
    Accessing the Raspberry Pi Configuration menu from the desktop
    Accessing the Raspberry Pi Configuration menu from the desktop
  2. Click on the ‘Display’ tab and then you will be able to adjust the ‘Headless resolution’ as seen in the screenshot below. Although it does not explicitly say VNC, this setting will affect your current and future VNC connections.
    Adjusting the VNC resolution via GUI on a Raspberry Pi
    Adjusting the VNC resolution via GUI on a Raspberry Pi

Set VNC resolution via command line




In case you do not currently have direct access to the Raspberry Pi desktop GUI, or if you just prefer to use the command line, you can refer to the following step by step instructions to configure the headless resolution via command line:

  1. Open a command line terminal and type the following command to open the Raspberry Pi configuration tool:
    $ sudo raspi-config
    
  2. Open up Display Options from the configuration tool.
    Opening display options
    Opening display options
  3. Then, highlight the option for VNC resolution and press Enter.
    Use the option to set VNC resolution
    Use the option to set VNC resolution
  4. Finally, we can set the VNC resolution to any of the choices on this menu.
    Select your desired resolution for VNC and exit the tool
    Select your desired resolution for VNC and exit the tool


Closing Thoughts

In this tutorial, we saw how to set the VNC resolution on a Raspberry Pi system. The VNC resolution is also referred to as the headless resolution, since it is not necessary to have a monitor plugged into the Raspberry Pi and still access its desktop environment. We can adjust the VNC resolution easily enough from the GUI menus as seen here, and can also configure the VNC resolution via command line, depending on what we currently have access to.



Comments and Discussions
Linux Forum