Alpine with bspwm and sxhkd on the Aopen Chromebase Mini


Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
The Aopen Chromebase Mini is a Rockchip RK3288 all in one device with 10” touchscreen.
bspwm is the binary space tiling window manager.
sxhkd is the simple X hotkey daemon.

This guide is written with a specific end result in mind so some steps may not be desired, depending on the use case.
I needed a configuration that:


See this guide for information on building a kernel and Alpine root filesystem for the Aopen Chromebase Mini.
Download a pre-built boot image here.

  1. Boot from the USB stick, login as root and run ./ to install the kernel and rootfs to internal storage.
  2. Reboot, login as root and run through the setup-alpine script, make sure to enter none when asked about disk usage.
  3. Create a new user, run visudo and uncomment the wheel group:
adduser sodface
addgroup sodface audio
addgroup sodface input
addgroup sodface video
addgroup sodface wheel
apk add sudo && visudo
  1. Test ssh and continue
  2. Uncomment the community and testing repos in /etc/apk/repositories
  3. Install the window manager and minimal supporting packages:
setup-xorg-base adwaita-icon-theme bspwm bspwm-doc mandoc mesa-dri-gallium mesa-egl sakura sxhkd touchegg ttf-dejavu xset


Auto Login

Edit /etc/inittab to automatically login the user created above.
Below is an excerpt of the file with a couple of lines of context.
Comment out the original tty1 line and add a new one as shown.

# Set up a couple of getty's
# tty1::respawn:/sbin/getty 38400 tty1
tty1::respawn:/bin/login -f sodface
tty2::respawn:/sbin/getty 38400 tty2

Window Manager

Automatically start the window manager after login by creating a file named .profile in the root of the user’s home directory.
Add the following content which starts the window manager provided the DISPLAY environment variable is zero length and the user is on tty1.
As the touchscreen is the primary interface, adding the -nocursor option hides the mouse pointer.

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]
    startx /usr/bin/bspwm -- -nocursor

Copy the default bspwm/sxhkd configuration files into your home directory:

install -Dm755 /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/bspwmrc
install -Dm644 /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/sxhkdrc

Edit ~/.config/sxhkd/sxhkdrc, minimially, you’ll want to update the terminal emulator hotkey:

# terminal emulator
super + Return

Edit ~/.config/bspwm/bspwmrc to start touchegg and launch apps in a specific layout.
Checking that $1 is zero ensures that this section is only executed on bspwm startup.
Use xset to disable dpms and prevent screen blanking.

[ "$1" = 0 ] &&
    #bspc rule -a Sakura:*:* -o desktop='^1'; sakura &
    #sleep .1
    #bspc rule -a Sakura:*:* -o desktop='^5'; sakura -x htop &
    QTWEBENGINE_DISABLE_SANDBOX=1 /usr/lib/WeaverServer &
    sleep 3
    echo "//open/" | nc -N localhost 9090
    xset s off -dpms
    touchegg &


Start the touchegg daemon at boot:

rc-update add touchegg