You can switch your VNC session screen geometry or resolution on the fly by listing all the possible geometries of the screens you want to use in future while creating vncserver.
The syntax for declaring two geometries 1280×768 and 1920×1080 is
sam@sun:~$ vncserver -depth 24 -geometry 1280x768 -geometry 1920x1080
You will get the following message in the terminal
New 'sun:3 (sam)' desktop is sun:3 Starting applications specified in /home/sam/.vnc/xstartup Log file is /home/sam/.vnc/sun:3.log
sun is my computer name and sam is username
Now open the vncviewer, by using the command
sam@sun:~$ vncviewer sun:3
To find the possible screen display options, run xrandr in the command terminal
sam@sun:~$ xrandr SZ: Pixels Physical Refresh *0 1280 x 768 ( 325mm x 195mm ) *60 1 1920 x 1080 ( 488mm x 274mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal Reflections possible - none
The message indicates two possible display options and the current geometry is marked with ‘*’.
To change screen setting to one that is listed above, type in the command terminal of vnc session,
sam@sun:~$ xrandr -s 1920x1000
Now you can see the change in screen geometry to 1920×1080.