Graphical Desktop Environment / Workstation

[Ref: OpenBSD 5.0, FAQ: The X Window System]

Each person's preferred work environment is different, in this guide we adapt on many fine online tutorial to see if we can understand some of the landscape for a Graphical Desktop Environment (GDE) on OpenBSD.

The Graphical Desktop Environment (GDE), is standard for most desktops. Those extra pixels on large screens are magnets for more terminal screens, and the occassional web browser etc. The graphical workstation desktop is (as with most things in Unix) built from various software components:

The OpenBSD ports system provides a functional windowing environment, and the ports system allows for greater customisation through selective installation of other Graphical User Interface (GUI) Desktop environments.

X Window System

[Ref: FAQ: The X Window System]

From the FAQ:

The X Window System (sometimes just called "X", other times, incorrectly called "X Windows") is the environment which provides graphics services to OpenBSD and other Unix-based systems.

If you're new to configuring X on OpenBSD, it is highly recommended that you ignore all other documentation, and first look at the FAQ

The relevant warning is inside the FAQ

Sometimes things go really bad. Yes, it is usually good to get X running before you load critical applications on the system. Sometimes, a bad X configuration will hang the entire machine to the point that only a hard reset will resolve the problem.

The FAQ contains useful techniques, examples for identifying and modifying configuration settings to get the best X experience.

Display Manager

[Ref: xdm(1)]

The Graphical Display Manager, provides the GUI version of services provided (at the text console) by init, getty and login: such as managing multiple monitors, prompting for a login name and password, authenticating the user, and running the Graphical User Shell session.

When the Graphical User Shell session is terminated, the display manager resets the X server and (optionally) restarts the whole process.

OpenBSD installs xdm(1) and in the ports system includes:

  • Gnome Display Manager (workstation/display.html#gdm)
  • KDE Display Manager (workstation/display.html#kdm)

Window Manager

[Ref: FAQ: The X Window System]

The Window Manager, provides the Graphical User Shell, replacing the traditional character-based terminal session.

From the FAQ:

by itself, X provides very little: one also must have a "Window Manager", to present a user interface. Most of the "personality" one will feel from X will be due to the window manager, rather than X itself. OpenBSD ships with a free version of the fvwm(1) and cwm(1) window managers, although you may wish to use any of the other window managers that are in packages. Search using a key of "window manager" for a list of the many window managers available.

From fvwm(1):

Fvwm is a window manager for X11. It is a derivative of twm, redesigned to minimize memory consumption, provide a 3-D look to window frames, and provide a simple virtual desktop.

From cwm(1):

cwm is a window manager for X11 which contains many features that concentrate on the efficiency and transparency of window management. cwm also aims to maintain the simplest and most pleasant aesthetic.

Other well known GUI Shells in OpenBSD's ports system include::

Productivity Tools

Productivity tools for the GUI shell, include the basics for navigating, interacting with the environment, such as creating menus, starting and stopping other applications.

Productivity Tools include Word Processing, Databases etc.

Tip: Caching Packages

In true Unix fashion, GUI Environments (such as Gnome and KDE) involve installing a lot of tools, toolkits. Subsequently, installation of a single binary package generally requires a lot of downloads. For those of us with slow connections to the Internet, we either pre-cache (download) all packages or cache downloads so for re-installs and speed deployment on other hosts.

Pre-cached packages are usually made available on our LAN from another machine, and we can cache packages downloaded during the pkgadd process using the environment variable PKGCACHE.

# mkdir /var/pkg/cache
# export PKG_CACHE=/var/db/cache
# echo "export PKG_CACHE=/var/db/cache" >> ~/.profile

Set the PKG_PATH environment variable pointing to the binary package mirror we will be using. In our environment, we specify:

  1. The cache, and
  2. our local LAN mirror,
  3. a Public repository.
# export PKG_PATH=${PKG_CACHE}/:http://local-repo/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/:ftp://remote-repo/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/