dd if=/dev/random of=/dev/blog

2. June 2009

VirtualBox and the X Windowing System

Filed under: BSD, Red Hat, Solaris, Ubuntu, Linux, UNIX — admin @ 07:49

Before I continue with my entry, I just wish to note that VirtualBox 2.2.4 has been released. You can review the Changelog here.

Anyways, whenever virtualizing a non-Windows operating system which utilizes the X Windowing system over VirtualBox, it may be beneficial to have some flexibility on supported resolutions for the GUI. For example, I was using OpenSolaris 2008.11 and VirtualBox seems to create a “virtual” monitor where the operating system (specifically X) is unable to read the monitor’s EDID information to obtain supported resolution information (among other things). As a result of this, by default X assigns 800×600@60 and 640×480@60 as supported display formats. When you are working on a wider screen that supports something larger, this makes for an uncomfortable computing experience; especially with limited graphical space on the virtual client.

In my case, my laptop’s wide screen has a native resolution of WXGA (1280×800). So I had plenty of extra room to work with. WhileVirtualBox allows you to fullscreen a virtual client, I like to multitask and this would limit my multitasking. I wanted to create a display configuration that would utilize most of the 1280×800 while allowing me to manage multiple other applications/windows on my host operating system. So I figured to write those entries manually in my xorg.conf file. This is located at /etc/X11/. So I began to play around with some standard display formats.

By default, OpenSolaris had the following under the “Screen” section:


Identifier     "Screen0"
Device         "Card0"
Monitor        "Monitor0"

Below that I added:


DefaultDepth     24
SubSection "Display"
    Viewport    0 0
    Depth      24
    Modes    "1024x768"  "1024x720"  "1024x600"  "800x600"  "640x480"
EndSubSection

I then reloaded X by rebooting the virtual client and once the operating system came back up, all those options were available. No more default 800×600 and 640×480. In the image below you will notice that the OpenSolaris Virtual Client is displaying at a 1024×600.

vbox with opensolaris

Added Note 3Jun09: Please refer to Comments 1-3 for information on Guest Additions.

Powered by WordPress