This user's work in progress page may be incomplete, and/or unreliable. The latest revision of this page is or will be located at Guide to Unix/BSD/OpenBSD/As a Desktop.

Wikibooks

edit
User:CFeyecare
User:CFeyecare
User talk:CFeyecare
User talk:CFeyecare
User:CFeyecare/sandbox
User:CFeyecare/sandbox
User Page Talk Sandbox


Sandbox 1   Sandbox 2   Sandbox 3   Sandbox 4   Sandbox 5  



 

OpenBSD as a Desktop

edit

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

edit

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>/install44.iso

In my case it is:

ftp://ftp.openbsd.org/pub/OpenBSD/4.3/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 modifications

edit

Follow the offical OpenBSD install instructions found here. Until you come to "Configure the network?". Enter: yes [default], fxp0 [default], system-hostname [default], no [default], dhcp, rtsol, home [default], 192.168.1.1 [default], yes [default], dhcp [default], no [default], no [default]. Continue until you come to the "lets install the sets". Enter: cdrom, cd0, 4.3/i386 [default], all, done [default], yes [default]... done [default], yes [default], none [default], yes, no [default], ?, <where you are located>, ?, <your sub-timezone>. Enter in "reboot" and your done!

Configuring Xorg

edit

Xorg normally "just work". If you have a weird screen resolution (or things look weird with xorg), then you need to do more configurations.

Method 1

edit

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

Xorg -configure

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

Extra configurations

edit

If you were not fortunate enough to have the configurations just work then...

I am working on it: I am currently figuring this one out myself. The xorg works however everything is out of proportion.

Method 2

edit

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 enviroment working

edit

OpenBSD has a great package management system (even if it is sometimes outdated). 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.3/packages/i386/

You may even want to put this into your .profile.

The packages are found through http here (for 4.3 packages).
The packages are also found through ftp here (for 4.3 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;pkg_add kdelibs;pkg_add kdeaddons;pkg_add kdeadmin;pkg_add kdeartwork;pkg_add kdeedu;pkg_add kdegames;pkg_add kdegraphics 
;pkg_add kdemultimedia;pkg_add kdenetwork;pkg_add kdepim;pkg_add kdesdk;pkg_add kdetoys;pkg_add kdeutils;pkg_add
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

To run xfce do

startxfce4

Using ports

edit

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 xvf 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 notibily the port system includes: e17 and KDE 4.1.

All of the ports are found: here

Get a display manager working

edit

GDM (recomended)

edit

Only one main package:

pkg_add gdm

Now vi the configuration file "rc". Scroll down to the bottom of the configuration file. (it is a long configuration file):

vi /etc/rc

Scroll down until you see:

#Alternatively, on some architectures, xdm may be started in /etc/ttys
if [ X"${xdm_flags}" != X"NO" ]; then 
echo 'starting xdm...';        /usr/X11R6/bin/xdm ${xdm_flags}
fi

Edit it so that it will start gdm as opposed to xdm. Replace it with:

#Alternatively, on some architectures, xdm may be started in /etc/ttys
if [ X"${xdm_flags}" != X"NO" ]; then 
echo 'starting gdm...';        /usr/local/sbin/gdm ${xdm_flags}
fi

Now change the xdm flags in /etc/rc.conf. Scroll down until you see:

# For some architectures, you must also disable console getty in /etc/ttys
xdm_flags=NO        # for normal use:""

Change the xdm flags by replacing the NO with "YES"

# For some architectures, you must also disable console getty in /etc/ttys
xdm_flags="YES"        # for normal use:""

Once you start up gdm change the session to whatever GUI you installed.

Warning: GDM does not automatically recognize the KDE session.

KDM (not recomended)

edit

The reason that this is not recomended, 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.

Authors

edit

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