Thursday, September 24, 2009

Change Screen Resolution For Ubuntu 8.04 (or 9.04) Running Under VirtualBox

Having Ubuntu 8.04 running on VirtualBox I could not find an easy way to increase the screen resolution higher than 800X600. This great tip shows how to configure the screen resolution in Ubunto 8.04 running as a virtual machine under VirtualBox.

In VirtualBox, click Devices->Install Guest Additions and your virtual Ubuntu should recognize a new CD. Open a terminal and run this command:
sudo /media/cdrom/ (check the file name to find a right one for your system, 32bit, AMD64)

The installer should prompt you that it’s time to restart the virtual machine once it’s done. Just logging out and back in should work.

This is where things get sticky. For Ubuntu 8.04 guests, the VirtualBox video driver will not be enabled because of the minimalistic xorg.conf file.

Open your guest machine’s xorg.conf file:
gksu gedit /etc/X11/xorg.conf

Find the device section, which should look like this:

Section "Device"
Identifier "Configured Video Device"

And replace it with this to enable the VirtualBox driver:

Section "Device"
Identifier "Configured Video Device"
Driver "vboxvideo"

Changing screen resolutions in Ubuntu 8.04 is done with RandR, which is not supported by VirtualBox. So you’ll also need to set a resolution manually. Find the screen section, which should look like this:

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"

And replace it with this, but change 1024×768 to your preferred resolution:

Section "Screen"
Identifier "Default Screen"
Device "VirtualBox graphics card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"

Save, exit the editor, and log out. You should now have a large virtual machine window, as well as mouse pointer integration.



Post a Comment

Subscribe to Post Comments [Atom]

<< Home