This page is dedicated to my experience with OpenBSD as a desktop OS. It's some sort of a scratch file in which I am collecting basic steps in order to be able to reproduce my installation in the future.

OpenBSD vs. Linux differences

Bearbeiten

OpenBSD is a complete OS including X11 and a standard desktop – contrary to Linux, which is a kernel, combined into an OS by the particular distributions.

OpenBSD GNU/Linux
doas* sudo
ksh bash
rcctl systemctl etc.

*sudo can be installed, but doas is the new default that offers a more comprehensive config syntax. It was also ported as opendoas to Linux.

Basic Installation

Bearbeiten

https://www.openbsdhandbook.com/installation/

Basic Configuration

Bearbeiten

/etc/doas.conf

Bearbeiten
permit pesist :wheel as root

[1]

enable ksh command history[1]

Bearbeiten

in $HOME/.profile change

export ENV="$HOME/.kshrc"

BEWARE: If you are using xfce4 or lxqt directly through xenodm, you need to add this variable also to the respective file of the desktop. (see below)

in $HOME/.kshrc

HISTFILE="$HOME/.ksh_history"
HISTSIZE=5000

Replacing the Standard Desktop

Bearbeiten

Prerequisites

Bearbeiten

The standard desktop of OpenBSD 6.8 consists of X11, the xenodm login manager and the fvwm window manager. In order to prevent the automatic start of an fvwm session after the login through xenodm, we have to open the file /etc/X11/xenodm/Xsession with root rights and outcomment the lines ${exec_prefix}/bin/xterm & and ${exec_prefix}/bin/fvwm with '#'.

Installing the Mate Desktop

Bearbeiten

scaling on HiDPI: deconf-editor

/org/mate/desktop/interface/window-scaling-factor

XFCE4 Desktop

Bearbeiten

In our user folder we have to create the file ~/.xsession and add:

startxfce4 --with-ck-launch

Good to have

  • xfce4-xkb
  • xfce4-pulseaudio

Applications and Features

Bearbeiten

SAMBA Client

Bearbeiten

Client: gvfs-smb

NextCloud/Owncloud-Client "too many files"-error

Bearbeiten

[2]

SAMBA folder

Bearbeiten

[3]

GTK2 theme/font switcher

Bearbeiten
gtk-chtheme

Hints, Solutions, Workarounds

Bearbeiten

fontcache force rebuild

Bearbeiten

fc-cache --force --verbose

workaroung for ugly bitmap Helvetica in Firefox

Bearbeiten

Problem:

Firefox uses the file helvR12-ISO8859-1.pcf.gz from /usr/X11R6/lib/X11/fonts/75dpi/ and /usr/X11R6/lib/X11/fonts/100dpi/

Workaround:

  1. https://git.ghostscript.com/?p=urw-core35-fonts.git latest snapshot (.t1 and afm files for they have more convenient metrics) -> ~/.fonts
  2. nano ~/.config/fontconfig/fonts.conf
  3. copy and paste the following code to nano, then save:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="same">
  <family>Helvetica</family>
  <prefer>
    <family>Nimbus Sans</family>
  </prefer>
</alias>
</fontconfig>

Font replacement problem[2]

Bearbeiten

Problem:

Bitstream Vera Serif used instead of Times New Roman

Workaround:

rm /etc/fonts/conf.avail/31-nonmst.conf

xfce4 environment variables

Bearbeiten
$ cp /etc/xdg/xfce4/xinitrc ~/.config/xfce4/"

then add the variables in the beginning of the file, directly under the header.

lxqt environment variables

Bearbeiten

lxqt as a GUI option in the settings

Firefox dconf error under xfce4

Bearbeiten

Problem: ~/.session-errors states:

(firefox:26530): dconf-CRITICAL **: 10:15:33.313: unable to create file '/var/run/user/1000/dconf/user': Permission denied. dconf will not work properly.

Solution:

# chown 1000:1000 /var/run/user/1000/dconf/user

doas chown USER:USER /dev/video0

  1. https://unix.stackexchange.com/questions/386319/how-to-enable-ksh-command-history-between-sessions
  2. https://misc.openbsd.narkive.com/PXtUHFwR/trouble-with-times-fonts-in-openbsd-4-5