It depends upon the version of the Xorg server in use. By default under Linux, VNC Server in Virtual Mode uses an old version of the Xorg server built into Xvnc, which is still recommended for Ubuntu and SUSE systems providing you change the desktop environment. However, from VNC Connect 6.2.0 you can configure VNC Server to utilise the latest version of the Xorg server on your system instead, which may give a considerably better experience for Red Hat and CentOS systems.
For users running Xvnc
You can specify one or more screen resolutions (geometries) for a virtual desktop using the VNC Server RandR parameter. If you set multiple comma-separated screen resolutions, a connected VNC Viewer user can cycle between them. For example, specifying the resolutions 1024x768,1280x1024,800x600 allows a connected VNC Viewer user to choose the one they want dynamically by running the command
xrandr –s <0|1|2>.
For users running the latest version of the Xorg server
You can specify the
–geometry WxH Xorg option in one of the standard Xorg option files provided by VNC Server (for example,
~/.vnc/config), or by appending it to the
vncserver-virtual command. By default, the initial value must be a standard resolution (for example, 640x480, 800x600, or 1024x768), but you can set non-standard screen resolutions by adding additional
ModeLine entries to the
Monitor section of the
/etc/X11/vncserver-virtual.conf file. A convenient way to generate the required Modeline is by using the
gtf command, e.g.
gtf 1920 1080 60
where 1920 is the width, 1080 is the height, and 60 is the refresh rate. Replace these values as required.
For larger resolutions, you may also need to change the VideoRam entry in the Device section and add a Virtual entry under the Display subsection of the Screen section.
Refer to the
Xorg.conf man page for more information.
Note the VNC Server RandR parameter cannot be used to enable a connected VNC Viewer user to cycle between available screen resolutions in this environment. A connected user should use the standard Screen Display or Monitor app instead.