Adding window managers to your Caldera box under KDM

So you're bored with KDE and would like to try something else. OK, let's rock.
I'm going to give two examples of how to do this:
the simple way (below)
the advanced way

I use the advanced way on my personal box as I feel it is more elegant and more
flexible for my personal use, but I recommend you start with the simple way at
first (until your are more familiar/comfortable with X).

Regardless of which you use, you should know the following:
The sessions that can be chosen from the KDM login manager are controlled
by the /opt/kde/share/config/kdmrc file. In it, you will find a line like:

SessionTypes=kde;failsafe;

If you wanted to add 'KDE 2', 'Gnome', or 'Enlightenment' to the available
choices, you would simply insert them into that line seperating them with
semicolons.

SessionTypes=kde;kde2;gnome;enlightenment;failsafe;

So, let's assume that you've downloaded your window manager, compiled, and
installed it (for hints on Gnome, click here).
Now, using afterstep as an example, you would edit the /etc/X11/kdm/Xsession
file. Jump down in the file until you see the 'case' statement. Under the 'case'
is a line that starts like

kde) [ -z "$KDEDIR" ] && {

a couple of lines down, will be a line like
;;
After that line, simply add
afterstep)

exec /path/to/afterstepinitrc
;;
or get a little more cmplicated like:
kde2)

KDEDIR=/opt/kde2;export KDEDIR
exec /etc/X11/xinit/kde2initrc
;;

Save the file, restart KDM, and you should now be able to choose afterstep from the drop down. Wasn't that simple?

But, to get it to work, you need to create the /etc/X11/xinit/<window manager>initrc file. Use this template:

#!/bin/sh

# Hacked together from common sources and modified by Douglas Hunley

# do the default thing that is common to all environments

# where is the xinit dir
if [ x"$XWINHOME" != x ]; then
    XINIT_DIR=$XWINHOME/lib/X11/xinit
else
    XINIT_DIR=/etc/X11/xinit
fi

# support for Sun's OpenWindows
export OPENWINHOME=/usr/openwin
export HELPPATH=$OPENWINHOME/help

# all the relevant X resources
sysmodmap=$XINIT_DIR/.Xmodmap
usermodmap=$HOME/.Xmodmap
sysresources=$XINIT_DIR/.Xresources
userresources=$HOME/.Xresources
sysdefaults=$XINIT_DIR/.Xdefaults
userdefaults=$HOME/.Xdefaults

# what's the correct way to use xrdb
if [ -x /lib/cpp ]; then
    XRDB=xrdb
else
    XRDB="xrdb -nocpp"
fi

# build the X resources settings
for res in $sysresources $userresources $sysdefaults $userdefaults ; do
    if [ -f $res ]; then
        $XRDB -merge $res
    fi
done

# alter the keymap as needed
for map in $sysmodmap $usermodmap ; do
    if [ -f $map ] ; then
        xmodmap $map
    fi
done

# check for needed space
space_tmp=`df /tmp | xargs | cut -d" " -f11`
space_home=`df $HOME | xargs | cut -d" " -f11`
if [ $space_tmp -lt 50 ]; then
    echo "Not enough free disk space on /tmp"
    exit 1
fi
if [ $space_home -lt 25 ]; then
    echo "Not enough free disk space on $HOME"
    exit 1
fi

# check for needed write perms
testfile=X_$$.testfile
if ! echo TEST_TEXT >/tmp/$testfile 2>/dev/null ; then
    echo "Have no write permissions for /tmp"
    exit 1
fi
rm -f /tmp/$testfile 
if ! echo TEST_TEXT >$HOME/$testfile 2>/dev/null ; then
    echo "Have no write permissions for $HOME"
    exit 1
fi
rm -f $HOME/$testfile 

# now we do the environment specific things

    gnome)
        # Gnome specific things

        exec $GNOMEDIR/bin/gnome-session
        ;;
    afterstep)
        exec /path/to/afterstep
        ;;
esac
Any issues with these steps should be sent to me, dhunley@columbus.rr.com.
searchSearch Index