A suckless debian installation

Remember my last story about my awesome debian installation? Well it didn’t work out as I wanted it. Awesome itself was somehow to heavy for my taste. So many customization options. Huge lua scripts for all kind of tasks - no matter how simple they where etc etc.

Well I was reading a lot lately and liked it more and more.

I like:

  • the idea that they don’t parse configfiles but instead you modify a config.h or the sourcecode and recompile the project
  • keeping there projects small and simple
  • don’t implement to many unnecessary features

All that makes the strength of their projects


Since they think you should recompile the project if you want some custom options/configurations or changes packaging doesn’t make sense for thier software. This is a bit of a problem on debian - since it has such a nice package managment and security concept around it.

I recommend to completly avoid all the suckless software packaged by debian (it’s very outdated anyways) and follow the official suckless recommendations to compile thier software by hand. Good thing - you normally just need the offical source tar files and can easily compile them (except of surf but I’ll show you how to compile it since it’s a bit more tricky to compile webkitgtk+)

In the end you have a nice debian system and a very tiny suckless desktop environment which fits perfectly to your taste.

Let’s Begin

Install Debian stretch on A1181 Macbook

We start with a Apple Macbook 2006 (A1181) - which can be a bit tricky to install since it has a 32bit i686 cpu. If you have a different device skip this step.

I have two of those and found that the offical installation guide found in the official debian wiki was only working with one of those two

This is a way to install debian stretch on it which always works.

Start out with a MacOS X Tiger (10.4) or MacOS X Leopard (10.5). Make sure to backup the following file /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport it’s the firmware file for the iSight Webcam which later can be installed on linux to get the integrated iSight Webcam to work.

Install rEFInd Bootmanager to boot an debian stretch netinstall i686 USB-Drive. Download the A binary zip file from unzip it and run the script sudo ./refind-install inside the unzipped folder.

Now plugin the debian flashdrive - reboot and boot the debian installer. At section [!] Software selection untick everything except standard system utilities and maybe SSH server.

Inside a fresh debian minimal install


This will put the psk and other stuff into the interfaces file.

wpa_passphrase SSID >> /etc/network/interfaces

Afterwards edit the mess in the file into the following:

auto wls1
iface wls1 inet dhcp
  wpa-ssid SSID
  wpa-psk <PSK FROM wpa_passphrase>

Install Software

You might want to install sudo and add your normal user to the sudo group.

apt-get update; apt-get install -y vim tmux xinit git build-essential wget curl


Set vim as default system editor

update-alternatives --config editor

Keyboard settings

Edit /usr/share/X11/xkb/symbols/us section xkb_symbols "mac" comment the following and add the missing lines.

//    key <LSGT> { [   section,  plusminus,       section,        plusminus ] };
//    key <TLDE> { [     grave, asciitilde,    dead_grave,        dead_horn ] };
    key <TLDE> { [   section,  plusminus,       section,        plusminus ] };
    key <LSGT> { [     grave, asciitilde,    dead_grave,        dead_horn ] };

This switches the keys with the ±/§ and the ~/\`.

//    include "level3(ralt_switch)"
    include "level3(lalt_switch)"

This makes it possible to use the left alt key as the modifier for the alt+u + umlaut.


Start tmux everytime automatically (add to ~/.bashrc) - you might want to add this to the root account too.

# tmux
[[ $TERM != "screen" ]] && exec tmux

Default configuration (add to ~/.tmux.conf)

set-window-option -g mode-key vi

alsa audio

apt-get install -y alsa-utils

make sure to use alsamixer to turn the volume up and unmute everything.

Suckless Suite


# install dependencies
sudo apt-get install -y libx11-dev libxft-dev libxinerama-dev

# dwm
tar xvf dwm*.tar.gz
cd dwm-*/

# fix for linux
sed -i 's,FREETYPEINC = ${X11INC}/freetype2,#FREETYPEINC = ${X11INC}/freetype2,g'

Replace #define MODKEY Mod1Mask in config.h with #define MODKEY Mod4Mask to set MODKEY to CMD/Windows Key

sed -i 's/#define MODKEY Mod1Mask/#define MODKEY Mod4Mask/g' config.h

enable mac like copy/pase -> cmd+c and cmd+v

sudo apt-get install -y xclip xvkbd

add the follwing to config.h

static const char *mcopycmd[] = { "sh", "-c", "xclip -selection primary -o | xclip -selection clipboard -i", NULL };
static const char *mpastecmd[] = { "sh", "-c", "xclip -selection clipboard -o | xvkbd -xsendevent -file - 2>/dev/null", NULL };

        { MODKEY,             XK_c,      spawn,     {.v = mcopycmd } },
        { MODKEY,             XK_v,      spawn,     {.v = mpastecmd } },

Compile and install

sudo make install

st - suckless terminal (xterm alternative)

tar xvf st*.tar.gz
cd st-*/
sudo make install


tar xvf dmenu*.tar.gz
cd dmenu-*/
sudo make install


First you need to install webkitgtk+

# install ninja build system
tar xvf v1.8.2.tar.gz
cd ninja-*/
./ --bootstrap
sudo cp ninja /usr/local/bin/

# install dependencies

sudo dpkg -i lib*

sudo apt-get install -y libgcr-3-dev

# webkitgtk
tar xvf webkitgtk-*.tar.xz
cd webkitgtk-*/
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
sudo ninja install

install surf from git

git clone
cd surf/
sudo make install

install codecs for youtube and similar sites

sudo apt-get install -y libxvidcore4 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-fluendo-mp3 gstreamer1.0-libav


git clone git://
cd slstatus

I use the following configurations config.h

// [...]

static const struct arg args[] = {
        /* function format          argument */
        { cpu_perc, "[CPU %3s%%] ", NULL    },
        { ram_perc, "[RAM %2s%%] ", NULL    },
        { battery_state, "[BAT %s", "BAT0" },
        { battery_perc, "%s%%] ", "BAT0" },
        { run_command, "[VOL %s%%] ", "/bin/sh -c \"amixer get Master | tail -n1 | grep -Po '\\[\\K[^%]*' | head -n1\"" },
        { ipv4, "[wls1 %s] ", "wls1" },
        { datetime, "[ %s ]",       "%F %T" },

this shows CPU, RAM, Battery state and percent, audio volume, wifi ip, date and time

compile and install

sudo make install


Add ~/.xinitrc to prepare our keyboard layout and start dwm

setxkbmap us mac

slstatus &
st &

exec dwm

X11 autostart

Start startx automatically after console login on tty1 (add to ~/.bashrc)

# X11
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then

Optional Software

iSight Firmware

To use the integrated iSight Webcam of the Macbook A1181 install isight-firmware-tools

Copy the file AppleUSBVideoSupport to a place on the Macbook and take a note of it’s absoulute path. The installation of isight-firmware-tools will ask for the path and you need to enter it there.

sudo dpkg -i isight-firmware-tools_1.6-2+b2_i386.deb

Now the firmware should be installed and you can remove ~/Desktop/AppleUSBVideoSupport if you want to.


cd /opt && sudo tar xvf ~/go1.10.1.linux-386.tar.gz && cd -
mkdir -p $HOME/workspace/go

add to ~/.bashrc

export GOROOT=/opt/go
export GOPATH=$HOME/workspace/go
mkdir -p $GOPATH
export PATH=${PATH}:${GOROOT}/bin
export PATH=${PATH}:${PATH}/bin

More infos