Guide to Unix/BSD/OpenBSD/As a Desktop
This is a guide on using OpenBSD as a desktop/workstation. This guide was made using OpenBSD 4.3 and 4.4. The concept should be the same in future releases.
If you are new to unix
Download the OpenBSD iso file and burn it using an iso burning program.
The download location is:
ftp://ftp.openbsd.org/pub/OpenBSD/<the version you want>/<your processor>/install<the version you want>.iso
In my case it is:
Now put the cd into the computer you want to install it on. Once it boots up quickly push F2 (this is called the BIOS). Find the boot sequence option (or similar) and select boot to cdrom. I recommend learning at least the basic commands and some vi beforehand.
Follow the official OpenBSD install instructions found here. Until you come to "Configure the network?". This is where things can get tricky. If you do not understand what it is asking, you can typically accept the defaults. Most people are going to want to use the default interface with DHCP (both default). If you get stuck, consult this guide
Xorg normally "just works". If you have a weird screen resolution (or things look weird with xorg), then you need to change your configuration.
The configuration file is located at /etc/X11/xorg.conf. However first we need to create the file. Run:
This created a configuration file in your home file. To test the Xorg setting in the configuration file, run:
Xorg -config /<your home directory>/xorg.conf.new
In my case it is (running as root)
Xorg -config /root/xorg.conf.new
It could be (running as puffy)
Xorg -config /home/puffy/xorg.conf.new
To exit out of the test (assuming it worked), press (control)+(alt)+(backspace). If things work, you are lucky. Copy the new configuration file to the /etc/X11/xorg.conf
cp /<location of your home directory>/xorg.conf.new /etc/X11/xorg.conf
This method will require knowledge of your graphics card, screen resolution, and monitor. Run the command:
Fill out all of the information. If you would like to skip over something then just press enter. In some cases you can not skip steps without messing up your configuration file. At the end of the questionare say "yes" to writing to the xorg.conf file.
Get a desktop environment working
OpenBSD has a great package management system. If you get the packages from the ftp site the pkg_add will find the dependencies for you. Export your PKG_PATH to your favorite ftp site. The ftp format is:
ftp://<your mirror>/pub/OpenBSD/<your version>/packages/<your processor>/
In my case it is:
# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/
You may even want to put this into your .profile.
Here are the main packages the pkg_add should resolve the dependencies.
I personally prefer to install them all at once. You may also want to add the -v option, if you want to see the details of the installation.
pkg_add kdebase kdelibs kdeaddons kdeadmin kdeartwork kdeedu kdegames kdegraphics kdemultimedia kdenetwork kdepim kdesdk kdetoys kdeutils kdeaccessibility
To run kde do
Here are the main packages the pkg_add should resolve the dependencies. (Xfce likes to keep their applications in separate packages)
TIP: you can save install everything at once with the following command:
pkg_add -i xfce
To run XFCE4 modify .xinitrc with your editor of choice to startxfce4
Although the binaries are sometime out of date the ports are amazingly up to date, new software is ported to OpenBSD after hours of release.
First get the ports from the install cdrom. First we have to make a directory to mount the drive to. Enter in the command:
cd /mnt mkdir cdrom
Mount the cdrom by entering in the command:
mount /dev/cd0a /mnt/cdrom
Now copy ports.tar.gz to /usr:
cp /mnt/cdrom/ports.tar.gz /usr
Now untar the ports:
tar xvzf ports.tar.gz
To update the port tree, cd into the file that you want to update and enter in the command:
cd <what you want to update> make checksum REFETCH=true
This may take a while...
To install a ports, cd into the CVS that you want to compile and do:
cd <what you want to install> make install clean
The port system should compile the dependencies for you. Warning: compiling may take several days. Most notably the port system includes: e17 and KDE 4.1.
All of the ports are found: here
Get a display manager working
Only one main package:
and (preferably) slim-themes
You have to add the following lines to your /etc/rc.local file:
if [ -x /usr/local/bin/slim ]; then echo -n ' slim'; ( sleep 5; /usr/local/bin/slim -nodaemon ) & fi
and edit /etc/slim.conf file (it is self-explanatory)
Update for OpenBSD 5.4:
It seems to be different in OpenBSD 5.4, just write /usr/local/bin/slim -d in /etc/rc.local (this will start it as a daemon). The default /etc/slim.conf seems to work without making any changes.
Only one main package:
This will display a message on how to enable GDM on your OpenBSD installation. You have to add the following lines to your /etc/rc.local file:
if [ -x /usr/local/sbin/gdm ]; then echo -n ' gdm'; /usr/local/sbin/gdm fi
Once you start up gdm change the session to whatever GUI you installed.
The reason that this is not recommended, even if you are using KDE, is that someone made an error while porting KDM to OpenBSD. KDM searches for startkdeconfig in the wrong directory and you are thus locked out.
Other persons comment: KDE is working perfectly well in OpenBSD 4.5 .
If you made a contribution to this article please feel free to add your username.
- CFeyecare- Started page.
- phessler unbroke kde pkg_add string