Installing Xorg and Fluxbox
It has become a very painless to enable a FreeBSD machine for use as a regular workstation. When I first tried this in FreeBSD 5-6 it was a proper nightmare (or maybe I just didn't know what I was doing back then). Anyway, apart from the build time, which packages can help minimize, there really isn't much to it. After following the steps below I install Firefox, Pidgin, OpenOffice, Virtualbox and all the other stuff I need on a FreeBSD workstation. After adding menu items to the Fluxbox menu for the applications I am ready to go.
Installation
To install Xorg and Fluxbox:
sudo portmaster /usr/ports/x11/xorg sudo portmaster /usr/ports/x11-wm/fluxbox
I go for the defaults in all the make config
screens I get presented with.
Note: This might take a long time on a slow cpu.
Automatic hardware detection
The nightmare that was xorg.conf seems to have vanished completely. Add the following lines to /etc/rc.conf
to enable automatic hardware detection for X:
hald_enable="YES" dbus_enable="YES"
Create the file /usr/local/etc/hal/fdi/policy/x11-input.fdi
and add the following to it to get Danish keyboard layout in X:
<?xml version="1.0" encoding="ISO-8859-1"?> <deviceinfo version="0.2"> <device> <match key="info.capabilities" contains="input.keyboard"> <merge key="input.x11_options.XkbModel" type="string">pc104</merge> <merge key="input.x11_options.XkbLayout" type="string">dk</merge> </match> </device> </deviceinfo>
Reboot the machine and hald
and dbus
should just work. Xorg works without any xorg.conf
.
Starting Fluxbox automatically when X starts
Create the file ~/.xinitrc (in your regular users homedir) and add the following line to it to start Fluxbox automatically:
exec fluxbox
Starting X
To start X run the command (as your regular user):
startx