Desktop Sharing between computers with different resolutionsJuly 31, 2016 by omiday ['ɔ:mi:deı]
xrandr allows selecting the display modes (a.k.a resolutions) however due to modelines being hard coded any additional modeline such as "2560x1600" or "1600x900" would need to be added into the code. I think the developers who wrote the code are much smarter and the hard coded list is just a sample of values. It leads to the conclusion that there must be a way to add custom modelines and man xrandr confirms it.
With that background if the goal is to share a VNC session between two computers with the above resolutions and assuming that the VNC server is the computer with the resolution of "1600x900":
Start a VNC session with a geometry matching the physical display:
On the "2560x1600" computer start the VNC viewer (Remmina has been working fine for me thus far) and connect to the remote VNC session:
Once inside the VNC session start up a terminal window.
Confirm that the new geometry is available in the VNC session:
and you'll notice the screen being quite small.
List the modeline for the "2560x1600" resolution:
or if the monitor is old get the GTF timings:
$ gtf 2560 1600 60 # 2560x1600 @ 60.00 Hz (GTF) hsync: 99.36 kHz; pclk: 348.16 MHz Modeline "2560x1600_60.00" 348.16 2560 2752 3032 3504 1600 1601 1604 1656 -HSync +Vsync
Add the new modeline to the current VNC session:
$ xrandr --newmode "2560x1600_60.00" 348.16 2560 2752 3032 3504 1600 1601 1604 1656 -HSync +Vsync
In the above xrandr output look for the display name on the second line:
VNC-0 connected 1600x900+0+0 0mm x 0mm
Bind the new modeline to the current VNC virtual monitor:
$ xrandr --addmode VNC-0 "2560x1600_60.00"
$ xrandr -s "2560x1600_60.00"