UP | HOME

Xinit

This is my X initialization file, it runs some programs to get the correct settings set-up and runs the window manager I choose with CDM.

Table of Contents

1 Mouse and keyboard

In order to make sure that, for example, my mouse buttons are switched to a left-handed configuration xmodmap must be run.

xmodmap ~/.Xmodmap

2 Background

Since I barely ever see my desktop background anyway I don't need to have a fancy-looking wallpaper, just a soothing color.

xsetroot -solid "#252A2B"

3 Startup programs

There are a few programs that I would like to have started when I log in.

3.1 Emacs

Since I have quite a bit going on in my Emacs init file it is nice not to have to wait for it to start up whenever I need it, but just have it start up once and let me connect to it endlessly. This is also nice when other programs call an editor, much faster than letting it start up each time.

emacs --daemon &

3.2 mpdscribble

I can listen to a bit of music every now and then, I have both a libre.fm and a last.fm account and I scribble my songs to them.

pidof mpdscribble >& /dev/null
if [ $? -ne 0 ]
then
    mpdscribble &
fi

4 Window manager

And finally, I start the window manager I selected from cdm. If, for some reason, no window manager has been chosen, for example when I use xinit or startx myself, fall back to herbstluftwm.

It also starts a console-kit session, but I haven't quite figured out how to configure is, when trying to reboot or halt through DBus, I still get a "not authorized" error.

wm=$1
test -n "$wm" || wm=herbstluftwm

exec ck-launch-session $wm

Date: 01-07-2012 14:38:08

Org version 7.8.11 with Emacs version 24

Validate XHTML 1.0