Changing the screen resolution of a VNC session

Using vncviewer it shouldn't be any more difficult to change the resolution of the remote desktop than simply changing the geometry e.g. vncviewer -geometry 1024x720.

However, that only changes the dimension of the viewing window, not the desktop size itself. To change the desktop resolution we have to change it at the VNC server. To do this I installed vnc4server as show below:

sudo apt-get install vnc4server

Then I started vnc4server with the geometry size I wanted the desktop to be e.g.

vnc4server -geometry 1024x720

The I connected to the VNC session using the vncviewer, and the desktop was at the right size I expected.

Note: When running vnv4server on the Raspberry PI using Raspbian, it default to Openbox which was ideal for me.

23-12-2015 20:28