Installing Xorg and Fluxbox

From TykWiki
Jump to navigationJump to search

It has become a very easy 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. After adding menu items for the applications to the Fluxbox menu I am ready to go.


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:


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">
    <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>

Reboot the machine and hald and dbus should just work, making Xorg work 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):