Friday, April 09, 2010

VirtualBox / Ubuntu 9.10 getting resolution higher than 800x600

In order to evaluate one more extension for OpenERP (medical), we moved to virtualBox and Ubuntu 9.10.

Windows (7 but also XP) complains about the driver signature but we ignored it and this just worked. However the screen remains stretched at 800x600 resolution. Moving to full screen changed nothing.

Similar experience with Vmware got me to the install of the addons inside the new virtual host. But nothing changed inspite of a few reboots...

So the rest is based on various post on the web and a bit of tweaking on my side...

1) There is a VirtualBox command line :

C:\Program Files\Sun\VirtualBox>VBoxManage.exe setextradata global GUI/MaxGuestResolution 1600,1200

No change at this stage.

2) Searching on the web... I found a comment suggesting to add a display in the /etc/X11/xorg.conf:

SubSection "Display"
            Depth        24
            Modes        "1024x768"
        EndSubSection

3) But I could not find any xorg.conf !
I and X never made a good couple. 10 years ago I burned a screen playing with frequency settings... A few posts suggested to create and xorg.conf manually. That's the hard way and I am lazy more by caution than by nature...

4) Ubuntu is getting away of xorg.conf !
Here is a post that saved me (could not find the name of the author -- so a lot of thanks if he recognizes these lines)
This command will stop the X : sudo service gdm stop
Now we need to generate the xorg.conf file:  sudo Xorg -configure
This has generated the file in ~/xorg.conf.new.
We need to make the X using it so we have to put this file inside /etc/X11/Example :  ~# sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
After moving this file to the proper location you can start the X again and see what happens: sudo service gdm start

No here is my added value of the day:

5) Control the resolutions available with : xrandr

6) And finally the problem is... 
that because in Ubuntu 9.10 xorg.conf is not there by default it is not adapted... so just re-install the virtual box driver (tip when they are installed on the bottom bar you see a mouse with a green arrow)  and you can see X11 being updated. One more restart and you are in business !

See below for reference and enjoy higher resolution !

fred@fred-desktop:/media/cdrom$ sudo ./VBoxLinuxAdditions-x86.run
[sudo] password for fred:
Verifying archive integrity... All good.
Uncompressing VirtualBox 3.1.6 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version of VirtualBox Guest Additions...
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module
 ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers
Installing X.Org Server 1.6 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

No comments: