Inside:
  Menu:
      Home
      FAQ
      Wishlist
      Photography
      UNIX Stuff
      PF Project
      Validate Me
      Contact Me
  Archived:
      11 May `04
      17 April `04
      5 April `04
      19 Mar `04
      3 Mar `04
      6 Feb `04
      14 Jan `04
      24 Dec `03
      15 Nov `03
      2 Nov `03
      20 October `03
      12 October `03
      4 October `03
      25 Sept `03
      14 Sept `03
      7 Sept `03
      31 August `03
      18 August `03
      6 August `03
      3 August `03
      31 July `03
      25 July `03
      20 July `03
Building X on OpenBSD
I recently installed OpenBSD on a spare box at home, hoping to have a play with it and a possible migration to it from FreeBSD (which I have been using now for about 2 years)

I found FreeBSD quite easy to install and have never really had any problems with the install and configuring XFree86 on it - a few tweaks of the XF86Config file and its ready to go, unfortunatly this wasnt the same experience with OpenBSD. I couldnt find any conclusive help on configuring X for OpenBSD, so I had to fiddle and fiddle untill I worked it out - maybe this help file will help others who are in the same situation :]

Here is the method I used to configure X on OpenBSD:

I used the guidelines on www.openbsd.org to help me with the install process, this installed the basic OpenBSD system on my machine. When the install completed and rebooted I logged into the root account and created another user (making sure the user was in the 'wheel' group so it could su).

With this all done i logged out of root and logged into my user account, then su`d to root, typed xf86cfg - nothing happened, so i then proceeded to have a look at the XF86Config file (dont fall into a trap i see most people fall into - XF86Config has two locations [that in theory should be symlinked but in most instances arent!] /usr/X11R6/lib/X11/ and /etc/X11/ are the locations, make sure both these files have the same content). There was no XF86Config file and xf86cfg didnt work, I had to get X working with Windowmaker!

xf86config was my next option - a text based version of xf86cfg - to use this you have to know your hardware config, I did know mine at some stage, but couldnt remember it, so what I did was put in some rough figures through the xf86config process (be weary doing this because you might end up monitorless). On completing xf86config (still as root) i typed startx - low and behold that wonderfully disgusting fvwm windowmanager - i wanted Windomaker and I was going to install it!

I closed my X session and then did an xf86cfg which brought up the configuration screen, i configured X to my liking and then quit. I then went into /etc/X11/ and used vi (vi XF86Config) to make some custom adjustments to the file - like the monitor manufacturers recommended horizontal and vertical refresh rates. I then issued the following command cp XF86Config /usr/X11R6/lib/X11/ which copied the XF86Config file to that directory.

Then I typed startx and I had the resolution and refresh rate i wanted. I closed my X session exited from root and typed startx - nothing just an error message that startx wasnt found, this was really starting to piss me off! A quick look at my environmental variables (the 'env' command) showed that /usr/X11Rs/bin/ wasnt in my path - a quick edit of .profiles fixed that!

PATH=/home/dave/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games:
was the old path, this is what it looks like now -
PATH=/home/dave/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:

Now the startx command worked, but I got some frustrating error messages - a quick look through XFree86.0.log (more /var/log/XFree86.0.log) revealed that i didnt have permission to read /dev/wsmouse which is my mouse daemon.

As root a quick chmod 644 /dev/wsmouse did the trick, after exiting from root i typed startx and X started - woohoooo! My only problem was now I had to work out how to get Windowmaker on this machine? There were no installed ports (/usr/ports/ didnt exist), another quick read of the info at www.openbsd.org revealed that the ports are stored as ports.tar.gz on the OpenBSD cd.

I inserted the OpenBSD cd and mounted the CD rom (as root, mount /dev/cd0a /mnt) and the i cd`d into /mnt and then into the 3.2 dir, cp ports.tar.gz /usr && cd /usr && tar -vzxf ports.tar.gz were the next commands I used - this copied the ports and untarred (unzipped) them to the /ports dir!

I then cd`d into the ports dir, then into the x11/windowmaker dir and issued the make && make install command - this after a lengthy period of time installed windowmaker on my system.

At this stage issuing the startx command will still drop me into fvwm - something i really didnt want to see again, I made a new file in my home dir vi .xinitrc and added the line exec wmaker in it and then saved it - after issuing the startx command i was thrown into Windowmaker - WOOHOOOOOO!

So thats it, if your game to try that extensive exercise you you should be able to get any windowmanager working on OpenBSD!