29 Jan 2022

OpenBSD 7 Xfce Desktop

I blogged previously about why one should use OpenBSD and this time I would like to document steps to have a fully working Xfce Desktop with default installation. My goal is to keep the changes minimal only to absolutely required steps, nothing more nothing less. If you find steps missing (or did not work as expected) or not necessary, please drop me a line via k tuman at acm dot org so I can address and update this blog if needed.

  1. Download the img and make USB boot disk:

    curl -O
    sudo dd if=~/Downloads/install70.img of=/path/to/usb
  2. Boot from USB disk. Press I and hit enter when you see the `Welcome to the OpenBSD/amd64 7.0 installation program.` and follow the prompt. It is pretty straightforward. Once it is done, just reboot, which will automatically downloads and installs needed firmwares for your laptop. --NOTE:– You can select whole disk and auto layout if you are not sure. Using wired connection for network interface is highly recommended.
  3. Once you login, switch to root account, add needed packages and needed configs like this:

    su  ## prompts for root password
    pkg_add xfce xfce-extras ## install xfce desktop
    sed -i 's/xconsole/#xconsole/' /etc/X11/xenodm/Xsetup_0 # no xconcole
    usermod -G operator <user name> # so you can use xfce to log out, reboot etc
    usermod -G wheel <user name> # so you can use doas
    echo "permit persist :wheel" >> /etc/doas.conf # doas = sudo
    rcctl enable messagebus ## enable dbus
    rcctl start messagebus ## start dbus
    rcctl enable apmd ## enable power daemon
    rcctl start apmd  ## start power daemon
    exit # switch to your user account
    echo "exec startxfce4" > ~/.xsession ## auto launchs xfce4 desktop
    doas reboot ## restart to have a xfce default desktop

Bonus Tips and Tricks

Tags: openbsd