Using NetBSD as a Gnome workstation

       841 words, 4 minutes

After a quick review of OpenBSD as a workstation, I wanted to see what NetBSD was like. I’ve used NetBSD quite a lot for both servers and workstations. But since I got my MacBook Pro, two years ago, I only use NetBSD as servers.

So I’m gonna have a look at NetBSD 5.1 and see if I could give this to my daughter.


I installed NetBSD using a USB stick as described here on an Asus EeePC 900.

The installation went smooth and not much have changed since my last installation. It is text-based but as easy to answer questions. Once done, reboot and you get to the prompt.

First boot

Ouch… white on black terminal… This is mainly why I like NetBSD: start with the minimum and only add what you need. But this would be a bit hard for a non-admin one…

Anyway, log in as root with the password you setup during installation. Create a daily user account to use:

# useradd -m -g users -G wheel -c "Joel Carnat" -s /bin/ksh jca  
# passwd jca 

Configure a few basics of the system:

# vi /etc/rc.conf  
# /etc/rc.d/network start  
# /etc/rc.d/apmd start  
# /etc/rc.d/powerd start 

Wireless network

I’ll be using the wireless interface on a WPA network:

# vi /etc/wpa_supplicant.conf  
  ssid="my SSID"  
  psk="very secret passphrase"  

# vi /etc/rc.conf  
dhclient_flags="-q ath0"  
wpa_supplicant_flags="-B -iath0 -c/etc/wpa_supplicant.conf"  

# /etc/rc.d/wpa_supplicant start  
# /etc/rc.d/dhclient start 

Now, we should be ready to surf the Wild Wild World.

The graphical interface

Now, it’s time to get a bit of graphics:

# X -configure  
# mv /root/ /etc/X11/xorg.conf  
# startx 

With my french keyboard, I modified the configuration file before starting X:

# vi /etc/X11/xorg.conf  
Section "InputDevice"  
  Identifier "Keyboard0"  
  Driver "kbd"  
  Option "XkbLayout" "fr"  

The package manager

NetBSD and the pkgsrc system come with a few tools to manage the packages. They are quite usefull to grain-manage your packages. But there is another tools which is a bit user-friendly: pkgin. Let’s install it:

# pkg\_add\_2011Q1/All/pkgin-0.4.2.tgz  
# vi /usr/pkg/etc/pkgin/repositories.conf  
# pkgin update 

Let’s install the sudo tool to manage root commands from standard user and the estd daemon that will lower and raise your CPU speed on system demand:

# pkgin in sudo  
# visudo  
$ sudo pkgin in estd  
$ sudo vi /etc/rc.conf  
$ sudo /usr/pkg/share/examples/rc.d/estd start 

The Gnome environment

I like XFCE and WindowMaker. But when it comes to Desktop for the mass, KDE and Gnome might be a smarter choice. On NetBSD, there used to be a meta package that allows installing Gnome in one shot. Unfortunately, it doesn’t seem to exist, at the time of writing, from the binary packages set.

Here’s how I did the install:

$ sudo pkgin in alacarte brasero bug-buddy cheese dasher deskbar-applet needs \
ekiga empathy eog epiphany evince evolution evolution-data-server \
evolution-exchange evolution-mapi evolution-webcal file-roller gcalctool \
gconf-editor gdm gedit gio-fam gnome-applets gnome-backgrounds \
gnome-control-center gnome-desktop gnome-desktop-sharp gnome-doc-utils \
gnome-games gnome-icon-theme gnome-keyring gnome-mag gnome-media gnome-menus \
gnome-netstatus gnome-nettool gnome-panel gnome-power-manager gnome-screensaver \
gnome-session gnome-settings-daemon gnome-sharp gnome-speech \
gnome-system-monitor gnome-system-tools gnome-terminal gnome-themes \
gnome-user-docs unpackaged gnome-user-share gnome-utils gok \
gst-plugins0.10-base gst-plugins0.10-good gst-plugins0.10-pulse gstreamer0.10 \
gtk2-engines gtkhtml314 gtksourceview2 gucharmap gvfs hamster-applet \
libgail-gnome libgnomekbd libgnomeprint libgnomeprintui libgtop libgweather \
liboobs librsvg libsoup24 libwnck metacity mousetweaks nautilus orca seahorse \
seahorse-plugins sound-juicer swfdec-gnome tomboy totem totem-pl-parser vinagre \
compilation vino vte yelp zenity

This is a list of packages that comes from the meta-pkgs/gnome in the CVSWeb interface. On an admin machine, I would have used pkgsrc and make process ; but I want to check the binary way.

There are a few other recommended things to install:

$ sudo pkgin in gnome-mount  
$ sudo pkgin in aspell-francais aspell-english  
$ sudo pkgin in gst-ffmpeg gst-plugins0.10-x264 gst-plugins0.10-resindvd gst-plugins0.10-a52 gst-plugins0.10-xvid 

And some commands and configuration files to update:

$ cd /dev  
$ sudo sh MAKEDEV drvctl  
$ sudo vi /etc/rc.conf  
$ sudo vi /etc/rc.local  
/usr/pkg/share/examples/rc.d/avahidaemon start  
/usr/pkg/share/examples/rc.d/dbus start  
/usr/pkg/share/examples/rc.d/hal start  
/usr/pkg/share/examples/rc.d/famd start  
/usr/pkg/share/examples/rc.d/dirmngr start  
/usr/pkg/share/examples/rc.d/nasd start  
/usr/pkg/share/examples/rc.d/gdm] start 

You can now either start all of those script by hand. Or you can reboot the machine to see if everything goes up correctly.

More stuff

If you want to, you can install the Firefox Web browser:

$ sudo pkgin in firefox-3.6.15  
$ sudo pkgin in firefox-l10n-3.6.15 

Should you need an Office-like tool, you can go for OpenOffice:

$ sudo pkgin in openoffice3 

You might want to install Flash support too. This would require install pkgsrc and installing from source. In this short review, I wanted to see what could be done with binary package only. I might detail the Flash installation in some other post.

Final thoughts

All in all, NetBSD is not that user-friendly to install. I’ve been using this OS for so long that I forgot how much console you have to use to setup a basic workstation. Once you’re done, it is really stable and feature-full but definitively harder to install than, for example, Ubuntu.

That’s All Folks!