Crunchbang, SLiM, and WM Madness

I’m now running Crunchbang Waldorf on the Acer Aspire One 722, having found that the testing version actually supports the most hardware out-of-the-box of ANY distro I’ve tried yet. Being a Debian fan it’s nice that it’s based on Wheezy as well.

The #! community being prone to using lightweight wms, I decided to try a couple, and am currently playing with dwm. First, however, I had to get SLiM (default login manager) to play nicely with multiple wms.

The simplest way to do this is just to edit /etc/slim.conf, and adding the wm session names to this list:

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
#sessions default,startxfce4,openbox,ion3,icewm,wmaker,blackbox,awesome
sessions openbox-session,dwm,spectrwm

The default is just “openbox-session”. I’ve added dwm and spectrwm (although so far I have been working only with dwm). Couldn’t be simpler.
Except for a problem. A window manager like dwm has no autostart file. Therefore, any programs or processes you wish to begin at startup must be called through ~/.xinitrc. By default SLiM does not look for or parse an .xinitrc. This can be easily changed, though, by uncommenting this line:

#login_cmd exec /bin/bash -login ~/.xinitrc %session

and commenting this line:

#login_cmd exec /bin/bash -login /etc/X11/Xsession %session

You can then construct your ~/.xinitrc- make sure it’s executable as well. Here’s mine:


# the following variable defines the session which is started if the user
# doesn't explicitely select a session

case $1 in
exec openbox-session
nm-applet &
synclient TapButton1=1 &
synclient TapButton2=3 &
eval `dbus-launch --sh-syntax --exit-with-session`
exec ck-launch-session dwm

The theme for SLiM can be changed easily by editing the theme config file in /usr/share/slim/themes. So far all I’ve done is change the font to match my system fonts. As a login manager I like SLiM quite well so far.