When accessing your Raspberry Pi 4 remotely via a VNC viewer or Teamviewer for the first time it is very likely the screen size shown has a very small resolution (320×200) and hence is unusable. So How to set the Raspberry Pi 4 remote connection screen resolution?
2. Set the remote connection screen resolution
Perform the following steps:
- Connect to your Raspberry Pi via a SSH connection (for example via Windows by using PuTTY) and login.
- Execute the following command:
Python1sudo nano /boot/config.txt
This will open the nano file editor with the Raspberry Pi 4 OS configuration file.
- Find the following 5 lines and if uncomment these if they are commented:
- Set the
framebuffer_heightto your required resolution
hdmi_modesettings to the values shown below:
- Ensure that the following two settings are commented by placing a # in front of them.
Python123# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3dmax_framebuffers=2
- After we complete all the changes, press
Ctrl+Oto write the changes, and then press
- Reboot the Raspberry Pi 4 by entering the command:
When connected again via VNC viewer or Teamviewer the resolution should be the same as set above.