Life SlashBoot The Internet Unices Web Development
This article last updated: Saturday, 22 April 2006

Using OpenBSD as a desktop operating system



Until recently I had thought of FreeBSD as the better BSD for desktop usage, on a day to day basis, but my opinion has changed recently. A couple of things brought me to the point where I really wanted to try out OpenBSD as a desktop environment. Firstly, I've recently acquired a nice laptop, a Dell Latitude c840, with a Pentium 4 2GHz, 256MB RAM, 40GB hard disk and CDRW/DVD(reader) combi drive. The machine also has two USB 1.0 sockets, built in 10/100Mbit networking, modem, sound card and a really nice screen, driven by a GeForce4 440 Go graphics chipset. It's a really nice machine which gets on with OpenBSD, like a house on fire. The second reason for wanting to try OpenBSD in a desktop guise, was because I had grown tired of my FreeBSD6 installation locking up completely, at random intervals. I mean really locking up, where all I could do was a hard reset and wait for fsck to do it's thing, which takes a while on my big drives. FreeBSD was running on my main machine. an Athlon 2600+ with 768MB RAM, 60 & 40GB hard disks, dual layer/format DVD reWriter, slot loading DVD reader and a few other odds and ends that I have for it.

I tried out a dual boot arrangement on the Athlon box, with OpenBSD 3.8 and FreeBSD 6, on separate hard disks, which is mainly for the sake of sanity, if things don't go too smoothly. I have a lot stored up in my preferred configuration on FreeBSD and if it all went pear shaped, I needed to be able to switch back to that arrangement without too much hassle. Since tinkering with OpenBSD on these matters, I've not even booted the FreeBSD install, to be honest. I dare say that the 40GB drive that currently holds FreeBSD, will probably be blanked and put into one of my upcoming firewalls. I've made some early tests on the Athlon box, to see what's the best way to go about setting up an OpenBSD desktop environment and applied the good stuff to the laptop.


I'm going to describe the installation of the laptop, which is the machine that I am writing this on, as it's the tidiest and best featured. I'll give some minor tips, in general form rather than step-by-step, which you should know by now is the style of things here at SlashBoot dot org. After doing a complete install, everything bar the smp kernel, the first thing was to unpack the source and ports tarballs. Remember, you need to CD into /usr/src before unpacking with tar xzvf and just CD to /usr/ when unpacking the XF4 (if required) and ports tarballs. Next I installed cvsup from packages and checked out the latest ports and src trees, to bring my local copies bang up to date. That takes a while, around 25 minutes on this machine, all in. Once everything was up to date, the first thing was to compile and install fluxbox, a light-weight window manager for X. I'd wanted to try it out and get away from my addiction to Gnome2 and had heard some nice things about it. Apart from being light-weight and thus efficient(ish) in it's resource use, it is also quick and easy to configure and tweak. Just remember to add /usr/local/bin/fluxbox to your .xinitrc file (in your home directory), so that it is used when you run startx. Have a look at the files in the .fluxbox directory , again inside your home directory, for easy manual configuration. The menu file is probably the one you will want to toy with first. A Unix hackers joy to play with, really.

Next came my choice of applications and Firefox, or at least some widely supported standards compliant graphical web browser, is high on my must have list. My up-to-date ports gave me Firefox (Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv: Gecko/20060217 Firefox/ which took a long while to compile, with all its dependancies, but is worth the wait. It has so far proven to be very stable and hasn't bombed out on me once. It's lovely to see my home folder devoid of Firefox core dumps. I usually use Evolution for email, but have now settled back on Thunderbird 1.5, because with the new improvements, it covers my needs perfectly. Again, as with all programs I mention here, it was compiled from the ports tree. Bluefish 1.0.1 was next up, for my web programming, but I've yet to get it working with Gnome-vfs2, for quick editing of files in-situ, instead resorting to SSH-ing into the server and nano editing them. I'll be looking into getting the integration in place, but it's not a major priority. gFTP is on and working smoothly, a great little FTP client, which I have grown to love.

That's the geeky and web stuff taken care of, now on to the multimedia type applications that I run. First was XMMS, for my MP3 collection (all legally ripped from CD) which I prefer to using the original CDs, due to power consumption when using a CD drive and wear and tear on the drive and discs. Had a slight problem with the installation of XMMS, but it was easily hammered into place eventually. When you are building from ports and run across problems when it tries to put a package into place, you can manually pkg_add the problematic package, with varying use of the -r or -F switches, before continuing with the install in hand. Be sure to use the package built in the process, which will now be residing in /usr/ports/packages/i386/all/. The -r switch is used to replace packages, when a previous version already exists on the system, and the -F switch accompanied by a suitable string, can help work around what I presume to be badly configured port scripts and specifications, as the libraries it claimed not to be able to find, clearly did exist and were the right versions, too. Read man pkg_add to see what I'm battering on about. The Gimp, version 2.2.10 which marks 10 years of Gimpness, was next on and works perfectly and really smoothly. xcdroast and cdrtools were installed, as I intend to use this laptop to create my backup archives, onto re-writeable CDs. Finally, MPlayer and the win32-codecs were built and installed, which completes my must haves, almost... Be sure to read the package info for mplayer ( pkg_info mplayer), to see what is needed to be able to use the win32-codecs in OpenBSD!

Hacking around

I say almost..., above, because I can't find a quick and easy way of plugging mplayer into Firefox, for when I want to listen to online audio commentaries and watch online videos, from my subscription service to one of the PremiumTV football news services. They insist on using Microsoft streaming media, .asx formats, to deliver the audio and video content. I usually make use of the mozilla-mplayer plugin for Firefox and Mozilla browsers, to hook the browser to mplayer, when I want to watch the interviews on the PremiumTV websites and listen to live audio commentary of matches that I can't get to. The video clips is easily worked around, as I can choose to download the clip to my machine and play it locally. The audio commentary isn't as simple, but it's not impossible without a plugin, with a little work. After checking out the HTML code and the javascript code that they use, it was fairly easy to figure out exactly where they hold the .asx file, that points to the streaming reflector at akamai-streaming. Once you have that .asx file, you have all you need to get at the goodies. All the .asx file actually is, is a small piece of html, which embeds a stream object, delivered over the mms protocol. For the uninitiated, you will see mms:// instead of http:// at the beginning of the addresses. As far as I can tell, there are two addresses there to offer some redundency in case the first one is too busy or doesn't work for some reason. Simply take the whole address, including and starting from the mms:// protocol specifier, to mplayer in a console and you'll see it filling up its buffer and soon you will be listening to the commentary. PremiumTV use a fairly simple way of doing it, so I can create my own addresses to the .asx files and be listening in, in no time.

Please note: This is intended to help subscribers of PremiumTV's online services, make use of the service, when they are using OpenBSD. It is not intended to assist anybody in getting anything that they are not entitled to. If you are a Windows user, then you don't need to do anything, as IE6 or Firefox will already hook into Windows Media Player. If you are using Linux or FreeBSD, just install the latest Firefox, mozilla-mplayer plugin and Mplayer applications and you're set. Not being able to get onto the commentary broadcasts was stopping me from migrating fully to OpenBSD, for my browser requirements. If you want a script to help you to connect to the PremiumTV audio commentaries, then pop into the scripts section. You might be able to adapt it for other services, but it is very simple and very PremiumTV oriented.

Next up, I'll describe the ease and efficiency of using and configuring xfce4 and fluxbox the best way to integrate them into OpenBSD, when I get around to it! ;) These are two pretty minimalistic gui desktop environments that, for me at least, are efficient and clean. xfce4 is the nicer looking and better featured of the two, but fluxbox is a joy to hack about with. It actively encourages you to tweak it via manual editing of its configuration files. I like that sort of thing.

Comments to this article

#1: R0bert
Friday, 9 May 2008
Nice article, indeed.

Post a comment:

No HTML allowed except for plain <b>, <i>, <s>, <u> & <p> tags. NO uBB code ([b] ... [/b] style tags) are allowed and comments containing [URL] ... [/URL] tags are automatically rejected as spam.
URL and email address are optional, email address is never displayed.
Like this page? Furl it | | Spurl it
GeoLocator Contact Sitemap
Standards for a better web Valid XHTML Strict CSS inside Valid RSS2.0 feeds used on this site
Hosted by BristolGeek