Using OpenBSD as a workstation

    

With the upcoming release of OpenBSD 4.9 and my previous testings with SOGo, I decided to give it a try as a workstation environment. I used OpenBSD for quite a while ; but this was decades before. If I’m right, this was about 2002. I was using stuff like WindowMaker, Sylpheed-Claws or Mutt (depending on the day mood), Mozilla or Lynx and XMMS. At this time, I was a SysAdmin so this was perfect are far from enough compared to Windows 2000. But nowadays, I’m a father storing loads photos and rendering personal week-end movies. I’m still a bit of a g33k ; after all, who would blog on using such OS…

But let’s see if Open Source software can do the trick.

Introduction

I’ve always been an Open Source fan ; maybe not for the “good” reasons though. One day, my father brought me a Linux CD and this is how it all started. I was just bored with Windows crashing very often and having to reinstall the whole system every two weeks. And I really liked the UNIX way to use.

I’ll use the term “Open Source” rather than “Free Software”. Just because it may not define the same kind of software. There are load of free software that are not open source. And in the OpenBSD world, that makes a huge of a difference.

So I’ll run OpenBSD on a (old) Dell Latitude D430 (Intel Core2 CPU) with a 30GB SSD and 2GB of RAM.

Installation

The Dell D430 doesn’t have a builtin CD drive. So I installed OpenBSD using a USB stick. The installation went smoothly.

I plugged the USB stick, hit F12 to select the boot media and told the bootloader to run bsd.rd.

One GREAT feature I discovered was installation option over WiFi. The installation process saw my wpi0 interface and I could specify my access point, security protocol (WPA-PSK) and passphrase. Sadly, I got the wpi0: error, 2, could not read firmware wpi-3945abg message. This is because, AFAIK, Intel didn’t release the wireless firmware in terms that allows OpenBSD to include it in the system. On a installed system, you have to download that firmware and install it by hand.

So I took a network cable, plugged it in the laptop and did the installed using the wired LAN interface. Read this to learn how to fully install the system. It’s quite straight forward.

This installation process simple. It is text-based ; so it might seem a bit g33ky. But truly, except the disk layout configuration which could be a bit tricky to understand, the installation process can be used by anyone ; since he/she’s not scared by non-graphics interface. You can nearly hit “ENTER” or defaults for every question. It does not look like as user-friendly as a Ubuntu installation process, but it is definitively simple to use.

Once done, you get to a prompt which tells you to reboot. Hell guys… you could have offer the option to reboot with a final y / n question… What’s the point, even if it is so simple, in having to type reboot by hand… Anyway, I used halt, took the USB key out and Strike a key to reboot.

The first boot

The BIOS screen, the boot loader screen, the kernel messages… Tada, the XDM login window! Yeah, I enabled xdm during the installation process. For the mass, the installation question Do you want the X Window System to be started by xdm(1)? means do you want a graphical login window on boot.

Enter the credentials you created during the installation process ; of course, Thou shalt not log as root! You now have a graphical environment running FVWM. It’s a bit bare in fact… And, in fact, it is not the bare window manager that I like best. I would rather use WindowMaker but that’s personal habits…

Setting up a Desktop 2.0 environment

Don’t get me wrong, FVWM is probably a great environment. But I wan’t to see if my grand-ma can run OpenBSD… So let’s install a few “simple” tools.

First of all, we want to install an easy package manager. Click on the “xterm” window and enter the following text:

$ su -  
Password: xxx  
# pkg_add pkg_mgr 

Note that xxx would be the root password that you configured in the installation process.

Now run pkg_mgr, select the x11/xfce4 category, check every entries using the SPACE bar and hit a. Watch the installation process and select the options when prompted.

This is definitively complex for an average user… Being able to decide which version of ghostscript or vim we need requires a bit of knowledge.

While we are here, let’s replace the login window with something simple that has a bit more features. In the term window, do the following:

# pkg_add slim  
# vi /etc/rc.conf.local  
#xdm_flags= # enabled during install  
# vi /etc/rc.local  
[ -x /etc/rc.d/slim ] && /etc/rc.d/slim start 

Let’s allow to auto-login with our preferred user. Note that this is quite unsecure:

# vi /etc/slim.conf  
default_user jdoe  
auto_login yes 

As a final touch, let’s configure the system so that XFCE starts as our default graphical environment:

$ echo "exec startxfce4" > ~/.xinitrc 

Here we are with a nice workstation environment. We’ll now check what software to use for various specific tasks.

BTW, I forgot to configure the major laptop feature : Advanced Power Management. One of the big change it’s do is manage CPU speed according to our use. This will allow to keep the laptop cool and quiet when we don’t need the CPU. Once again, we’ll have to use the g33k way. Open a Terminal and do the following:

$ su -  
Password:  
# sysctl hw.cpuspeed hw.setperf  
hw.cpuspeed=1200  
hw.setperf=100  
# apmd -C  
# vi /etc/rc.conf.local  
apmd_flags="-C"  
# sysctl hw.cpuspeed hw.setperf  
hw.cpuspeed=800  
hw.setperf=0 

You’ll see that the CPU speed is lowered when no power is needed. It will automatically raise when required and lower when not needed anymore. Wh00t!

Accessing my file

The file manager shipping with XFCE is called Thunar. I quite like it because it fast. Unfortunately, it is not able to access remote filesystems like Windows shares… Or at least, I didn’t get how to do it. Apart from this, it’s a nice tool that should cover 99% of your needs.

Note that it is able to render image thumbnails.

Dealing with USB keys, I didn’t find how to easily mount them.
What has to be done, I not that hard though. Open a terminal and issue the dmesg command. You should see a line about sd0 or sd with a number. This your USB device. If you then issue the disklabel sd0 command, you’ll see how it is formatted. Most of the time, you’ll see a line starting with a i: and ending with MSDOS. This is the partition where the data lies. Issue the mount -t msdos /dev/sd0i /mnt command and goto to /mnt with your file navigator. See the files ? ;-) You can know add/remove/rename/… with Thunar.
Do not unplug the USB key without a call. Go back to the terminal and issue a umount /mnt command. Then you can unplug it.

The Web browser

The XFCE installation I did comes with the Midori Web browser. This is a lightweight browser based on the WebKit rendering engine ; which is, if I’m not mistaken, the rendering engine used by Apple’s Safari.

If you want more Web features, you may install Firefox. It comes as a binary package and can be installed with pkg_mgr. Just look for firefox, then select your language pack. Start Firefox and configure the about:config as described in the installation message.

Using Midori on OpenBSD, you won’t get Flash-based web sites such as YouTube.

Video in Web browser

Using pkg_mgr, you can install gecko-mediaplayer.
This enables watching video in Firefox. I could watch videos from Apple’s Trailers but YouTube and DailyMotion didn’t work. Trailers from AlloCiné did crash Firefox.

To enable Flash video, you can install gnash. It does render the flash video. Unfortunately, it is quite slow.

If you really need YouTube access, you can install Minitube which is an application that browses and displays video from YouTube in non-flash format. It actually work nice. It lags a bit but this may be because of my (poor) video card.

Another tweak is to install “User Agent Switcher” in Firefox and configure it to use the “iPhone” user agent. This forces some of the website, like dailymotion, to render the video in MPEG.

There is an option with Opera and Flash but, AFAIK, it is a quite old version of Macromedia. So it may not render all the “new” web blobs. Furthermore, to install it, your have to go for the ports option. It is not that complex but I planned to write a review for the grannies.

E-mail client

There is an easy choice here : Thunderbird. There are loads of other mail client in OpenBSD. But as a generic user, coming from the Windows world, you should definitively use it.

Install it using your favorite language. I used the thunderbird-i18n-fr package which give me version 3.1.8 in French. In some other graphical environment, you may choose something like K-Mail or Evolution.

The media player

By default, the XFCE environment comes with “Parole Media Player”. Unfortunately, it doesn’t seem to be able to read ISO files. If you store your DVD as iso dumps like me, you can use pkg_mgr to install VLC. It will render those dumps perfectly.

The only thing VLC lacks, at least on this revision, is the ability to connect to the (French) Freebox TV service.

BTW, on that Dell D430, the volume buttons work out of the box.

Dealing with photos

XFCE ships with a software called Ristretto. It is very basic but it will enable you to view, rotate, delete and run slideshows on your photos.

Should you require more than this, you can install The Gimp and/or F-Spot.

Production tools

If you require Office like tool, you can rely on LibreOffice. This version of OpenBSD comes with libreoffice-i18n-fr, in version 3.3.2.2, which can be installed from pkg_mgr.

Most of the time, OpenOffice.org did well ; especially with Microsoft Office compatibility. Sometimes, there would be some issues. Having this piece of software running on OpenBSD definitely make it desktop friendly.

One more thing

You may wish to try some other more complex graphical environment. There are two major alternatives : Gnome and KDE. OpenBSD comes with Gnome 2.32 and KDE 3.5. Have a look at their websites and install/test those using pkg_mgr ; it’s quite simple to install.

I personally prefer Gnome. Mostly because KDE used to be quite slow and I liked the Gnome look better. But my father uses Ubuntu in the KDE edition.

One nice thing with Nautilus, the Gnome file manager, is the ability to connect with remote filesystems like FTP, SSH or WebDAV. Should you not forget to install the gvfs-smb package, you also be able to deal with remote Windows shares. Either browse them or connect to the share using the smb://SERVER/SHARE location. Note that VLC can’t read theme ; I guess it doesn’t know how to deal with GFS libraires. The Totem Movie Player can play the video from the remote GFS filesystems.

A last about Gnome and the USB key : I couldn’t found how to enable automatic mount/unmount. There may be some things to dig on with HAL but I didn’t understand it (yet).

Conclusion

Well… If you can do without Flash and automatic external device mount/unmount, OpenBSD does provide a really nice workstation. You probably won’t give it to your grandma except if you live really near or have a remote access to her home… But if you know someone who’s thinking about Linux (Ubuntu) and didn’t jumped yet, you may propose OpenBSD.