Last modified on 20 December 2014, at 15:26

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 unixEdit

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:

ftp://ftp.openbsd.org/pub/OpenBSD/4.4/i386/install44.iso

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.

Installation modificationsEdit

See also: Guide to Unix/BSD/OpenBSD/OpenBSD Installation

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

Configuring XorgEdit

Xorg normally "just works". If you have a weird screen resolution (or things look weird with xorg), then you need to change your configuration.

Method 1Edit

The configuration file is located at /etc/X11/xorg.conf. However first we need to create the file. Run:

Xorg -configure

or

X -configure

This created a configuration file in your home file. To test the Xorg setting in the configuration file, run:

cd /<your home directory>
Xorg -config xorg.conf.new

In my case it is (running as root)

cd /root
Xorg -config xorg.conf.new

It could be (running as puffy)

cd /home/puffy
Xorg -config xorg.conf.new

To exit out of the test (assuming it worked), press (control)+(alt)+(backspace). Copy the new configuration file to the /etc/X11/xorg.conf

cp /<location of your home directory>/xorg.conf.new /etc/X11/xorg.conf

Please note that if you are trying to install OpenBSD in a virtual machine under an existing Unix/Linux system running X, pressing (control)+(alt)+(backspace) may cause your real X session to stop, but modern distributions require pressing this key combination two or three times in a row to prevent accidents. The simplest way (although not the best way) to find out if it will break your session by pressing only once is to try it by pressing the combination exactly once while you are not running any programs besides your desktop, before you attempt to configure X in OpenBSD.

Method 2Edit

This method will require knowledge of your graphics card, screen resolution, and monitor. Run the command:

xorgconfig

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 workingEdit

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.

The packages are found through http here (for 4.4 packages).
The packages are also found through ftp here (for 4.4 i386 packages).

KDE (3.5)Edit

Here are the main packages the pkg_add should resolve the dependencies.

kdebase
kdelibs
kdeaddons
kdeadmin
kdeartwork
kdeedu
kdegames
kdegraphics
kdemultimedia
kdenetwork
kdepim
kdesdk
kdetoys
kdeutils
kdeaccessibility

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

startkde

Xfce (4.4)Edit

Xfce on OpenBSD

Here are the main packages the pkg_add should resolve the dependencies. (Xfce likes to keep their applications in separate packages)

gtk-xfce-engine
libxfce4mcs
libxfcegui4
xfce-mcs-manager
xfce-mcs-plugins
xfce-utils
xfce4-appfinder
xfce4-battery
xfce4-clipman
xfce4-datetime
xfce4-dict
xfce4-diskperf
xfce4-fsguard
xfce4-icon-theme
xfce4-genmon
xfce4-mailwatch
xfce4-mixer
xfce4-mpc
xfce4-netload
xfce4-notes
xfce4-panel
xfce4-places-plugin
xfce4-session
xfce4-systemload
xfce4-time-out
xfce4-verve
xfce4-wavelan
xfce4-weather
xfce4-wmdock
xfce4-xkb
xfdesktop
xfwm4
xfwm4-themes

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

Using portsEdit

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 workingEdit

SLiMEdit

Only one main package:

pkg_add slim

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.

GDMEdit

Only one main package:

pkg_add gdm

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.

KDMEdit

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 .

AuthorsEdit

If you made a contribution to this article please feel free to add your username.

  • CFeyecare- Started page.
  • phessler unbroke kde pkg_add string