For those wondering how to set the VNC screen resolution on your Raspberry Pi (I use a Pi4/8GB) to one fitting your monitor here is what I did to get the default 2560x1440 (60Hz) resolution for my iMac 5K (late 2015). This makes it much easier for me to see my MC27 views properly.
Disclaimer: I am very new to Linux and Raspberry so no guarantees, your milage may vary. My system is
Raspberry Pi4B/8GB: Linux RPi4 5.10.17-v8+ #14031) open a terminal on the RPi/VNC session
2) The following commands will show the current display and resolution, the right parameters for a display mode supporting 2560x1440, create that mode and add the mode to the existing modes
xrandr
# This will show the current display name (start of second line) and the current resolution (amongst other things)
cvt 2560 1440 60
# this reveals the necessary parameters to create a new mode
xrandr --newmode "2560x1440_60.00" 173.00 1920 2048 2248 2576 1080 1088 1120 -HSync +VSync
# this creates the new display mode. Replace everything starting with the opening quote mark (") with what you see in the output after the cvt command
xrandr --addmode HDMI-1 2560x1440_60.00
# this adds the new mode to the existing modes. Replace 'HDMI-1' with what you see after the
xrandr command as the display name
xrandr --output HDMI-1 --mode 2560x1440_60.00
# this activates the new mode and changes the resolution to 2560X1440
If you run into permission issues use
sudo in front of the commands.
The following should make these changes persistent upon every reboot:
1) Create (if not existing) a file in ~ named .bash_profile
cd ~
sudo nano .bash_profile
2) Copy the three
xrandr commands from above into the file and save it (<ctrl>o) and exit (<ctrl>x)
Disclaimer: I haven't tested the persistence yet
Sources:
https://unix.stackexchange.com/questions/274506/how-to-set-persistent-resolution-in-xfce-on-debianhttps://www.raspberrypi.org/forums/viewtopic.php?t=201245EDIT: changed incorrect cvt command to
xrandr command