Logging my quest into the NetBSD universe.

Tuesday, June 15, 2010

NetBSD meets Xorg meets Virtualbox

Personally I'm a console lover, which makes me belong to a group of people which is becoming a smaller and smaller part of the population. Thus the goal of this post is to explain how to get the X-server (in this case Xorg) functioning properly within Virtualbox. Configuring the X server is something which has been causing people troubles for years and years, even though things have evolved a lot the past decade. Thus we start by asking Xorg to create us a configuration file:

flying_spaghetti_monster# Xorg -configure 

As a result a new configuration file gets created which gets located in /root/xorg.conf.new at this point we can give the X server a testrun by calling:


flying_spaghetti_monster# X -config /root/xorg.conf.new

Et voila, we have an operational X-server:
To terminate this and to go back to the console press CTRL+ALT+BACKSPACE. As a next step we will copy this configuration file (which we tested) to a location where it can easily be found by scripts such a startx.

flying_spaghetti_monster# cp /root/xorg.conf.new /etc/X11/xorg.conf

If you now start the xserver using startx it will automatically use this configuration file and this time it will launch the twm window manager, xclock and two xterms.


flying_spaghetti_monster# startx

Which looks like this:
Okay, from the 70s look which the screenshots of the first post gave us, we now officially entered the 80s. At this point the maximum resolution however is only 800x600 for the simple reason that no guest additions are already available for NetBSD :(, which means the Xorg server can only use the vesa video driver and not the commonly used vboxvideo driver.