Friday, February 5, 2010

Virtual Box How to change screen resolution in a Ubuntu 9.10 guest system

Two days ago I installed a ubuntu 9.10 virtual machine.The process of installation went great except for the video driver.I have a  Sapphire ATI HD 4850 HD 512 DDR3 with an  and a Samsung SyncMaster T240HD monitor 1920x1200 maximum resolution.And yet the secreen maximum resolution was 800x600.
So after some reading of Virtual Box manual i found the answer.

You must install the Guest Drivers in the Ubuntu guest machine and create a xorg.conf file.

Step 1 - Start the virtual machine and mout the VBoxAdditions.iso
 If you can't find it on the menu you will have to find the image and mount it .If your on a windows host you will find it in your VirtualBox instalation folder mine is on d:\VirtualBox\.If you are on linux host you will find it in /usr/share/Virtual Box/ folder.




Step 2 - install the guest adition drivers
Open a shell and type:

cd /media/cdrom0/
ls -ltr 
If you are on 32 bit machine you must install  VBoxLinuxAdditios-x86.run like this:
sudo sh VBoxLinuxAdditios-x86.run
After the install completes reboot the sistem
Step 3 - create a xorg.conf file
Open a shell and type:
sudo  gedit /etc/X11/xorg.conf
Now copy this lines bellow in the xorg.conf file you just created and save the file.

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

EndSection

Section "Screen"
   Identifier    "Default Screen"
   Device    "VirtualBox graphics card"
   Monitor    "Generic Monitor"
   DefaultDepth    24
   SubSection "Display"
     Depth    24
     Modes      "1920x1200"
   EndSubSection
EndSection



Under modes put your own monitor resolution.Log out and after that you will be able to change the screen resolution using Sistem-->Preferences-->Display


No comments:

Post a Comment