How do I adjust the screen resolution of a virtual desktop under Linux?

Follow

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 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.

Was this article helpful?
15 out of 62 found this helpful

Comments

0 comments

Please sign in to leave a comment.