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:
apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms
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
cvt 1920 1080 60. This gives you the parameter set for the X Server. This means a resolution fo
60 fps. For an other resolution or another frame rate simply change that parameters.
$ cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Configure X Server
After that it is possible to configure your X Server. Configuration happens in three steps.
- Create new mode
- Assign mode to display
- Activate new display mode
$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
$ xrandr --addmode VBOX0 "1920x1080_60.00"
$ xrandr --output VBOX0 --mode 1920x1080_60.00
For further information please have a look into the
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.