Adding new resolution to the X window server

When running Debian Linux with VirtualBox there is limited support for high display resolutions. Per default a maximum resolution of 1024x768 is possible. For a modern operating system this resolution is definately not state of the art.

But there is a way to support a higher resolution than 1024x768. It is possible to switch to a resolution like 1920x1080 or more. Even more than one display is possible.

Providing Virtualization Guest Tools

Depending on your virtualization solution, it is a good idea to install extensions on your guest operating system . These extensions improve the interaction of your guest operating system with your hypervisor and your host operating system. When using Virtual Box it is reasonable to install Virtual Box Guest Additions. It improves handling with mouse and keyboard, sound and graphics, etc… . Please have a look into the documentation in case you are interested in which improvements you will gain. So the first step is to install them.

Installing Virtual Box Guest Additions

Simply install the following packages: virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms. When using command line for installation simply run:

Otherwise you can install them with the package manager of your choice.

New Resolutions available

When switching to system settings, new resolutions are available after installing virtualbox guest additions. But there is a maximum resolution of 1600×1200 available only. In case other resolutions including your desired resolution are available feel lucky as you don’t have to configure X Server manually.

Configuring X Windows Server

But it is possible to add other resolutions by configuring the X Window Server. For that do the following steps:

Get your configuration set for the X Server

E.g. enter cvt 1920 1080 60. This gives you the parameter set for the X Server. This means a resolution fo 1920x1080 with 60 fps. For an other resolution or another frame rate simply change that parameters.

Configure X Server

After that it is possible to configure your X Server. Configuration happens in three steps.

  1. Create new mode
  2. Assign mode to display
  3. Activate new display mode

For further information please have a look into the xrandr manpage.

Keeping display configuration after restart

In case you want to keep you settings simply add the new X Server configuration to a start script that is executed during system startup. Without that the new resolution will not be applied after restarting the system.
One way for that would be putting these comands into /etc/kde4/kdm/Xsetup. So on startup of the X Window Server the new resolution is added. For further information please have a look into the ubuntu wiki. Different ways to persist the information is described there.


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.