(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) X Windows :
How do I choose another windowmanager instead of KDE?
Here's how to configure kdm to launch afterstep instead of KDE. cd /etc edit the file inittab ; Note: You must su before editing this file There should be this line:
        id:3:initdefault:
Change the 3 to a 5. (I've actually had it work in both runlevels 3 and 5) Also in the file is:
        x:3:once:/opt/kde/bin/kdm
Change this 3 to a 5. Save changes. cd to your home directory. cp /etc/X11/xinit/xinitrc .xinitrc;
ln -s .xinitrc .xsession; edit .xsession; add 'exec afterstep' to the end of the file You may have to comment out the lines around exec startkde, exec fvwm, and Xclients. This method will launch afterstep from kdm, it doesn't allow choosing of window managers.
How do I choose MyFavouriteWindowManager(tm)?

I. From runlevel 3 (using startx):

You have to edit either your personal startup script (usually $HOME/.xinitrc) 
or the system default (etc/X11/xinit/xinitrc or /usr/X11/lib/X11/xinit/xinitrc).
Hollis R Blanchard has written a script that allows to choose the wm by typing
"startx fvwm", "startx wmaker" ... or whatever you like, provided it is
installed. It is available at:
http://www.andrew.cmu.edu/user/hollis/.xinitrc  

II. From runlevel 5 (the xdm/kdm login screen)

A.) xdm has quite a couple of files it looks for configuration info in. The first of
these is /etc/X11/xdm/Xsession (might also be $HOME/.Xsession, if existent).
Have a look into this one to see what files else are called:
/etc/X11/xdm/Xsession -> $HOME/.xsession, then if this doesn't exist, in turn
                      -> $HOME/.Xclients
                      -> /etc/X11/xdm/Xclients
                      -> /etc/X11/xinit/Xclients
To keep things simple, it is recommendable to edit the first one of these to
include 'exec mfwm' whatever. Alternatively, if you are using kdm, you can
configure /etc/X11/xdm/Xsession globally to allow each user to choose her
session type at login time:
Change the switch at approx. line 30 from

case $# in
1)
        case $1 in
        failsafe)
                exec rxvt -rv -fn 7x14 -geometry 80x44+60-0  #could be xterm
                ;;
        esac ;;
esac

to

case $# in
1)
        case $1 in
        failsafe)
                exec rxvt -rv -fn 7x14 -geometry 80x44+60-0  #could be xterm
                ;;
        *)
                sessiontype=$1
                ;;
        esac ;;
esac

and the conditional at the end of the file from 

if [ -x "$startup" ]; then
        exec "$startup"
elif [ -x "$HOME/.Xclients" ]; then
...

to 

if [ -n "$(type -path $sessiontype)" ]; then
        exec "$sessiontype"
elif [ -x "$startup" ]; then
        exec "$startup"
elif [ -x "$HOME/.Xclients" ]; then
...

Then you can add any WM or desktop you like to kdm's menu using kdmconfig (in
kde) or by editing /opt/kde/share/config/kdmrc. This should contain a line like:

SessionTypes=wmaker;afterstep;kde;fvwm;enlightenment;blackbox;failsafe;

B.) A setup similar to the above is described in great detail (with example files
and everything) in Wendell Duncan's "PPC Window Manager Setup":

        http://intermountain.com/~duncan/ppc/X11_help.html

C.) According to the manpage you can get xdm to pass an argument to Xsession by
defining keyboard translations in /etc/X11/xdm/Xresources like this:
        xlogin*login.translations: #override\
       <Key>F1: set-session-argument(failsafe) finish-field()\n\
       <Key>Return: set-session-argument() finish-field()
So you could set it up to e.g.

        xlogin*login.translations: #override\
       <Key>F1: set-session-argument(failsafe) finish-field()\n\
       <Key>F2: set-session-argument(wmaker) finish-field()\n\
       <Key>F3: set-session-argument(afterstep) finish-field()\n\
       <Key>F4: set-session-argument(startkde) finish-field()\n\
       <Key>F5: set-session-argument(fvwm) finish-field()\n\
       <Key>F6: set-session-argument(enlightenment) finish-field()\n\
       <Key>F7: set-session-argument(blackbox) finish-field()\n\
      <Key>Return: set-session-argument() finish-field()

and choose your WM with the function keys.
The description by Wendal Duncan (<A HREF="http://www.intermountain.com/~duncan/ppc/X11_help.html">http://www.intermointain.com/~duncan/ppc/X11_help.html</A>) is very good, certainly very helpful for newbies, but there is a mistake on one of the pages which can cause some major trouble.

The page <A HREF="http://www.intermountain.com/~duncan/ppc/node5.html">node5.html</A>, "The Heart of the matter - Xsession" shows an example Xsession file. If you follow this example file to the letter, you can cause some problems. The case statement which processes the window manager arguments has a statement missing that can reek some havoc on your logins.

To fix this problem, the case for AnotherLevel needs to be changed in the following way:

 AnotherLevel)
                OPTIONS=""
                RCFILE=""
                for tryfile in "$HOME/.fvmw2rc.m4" "/etc/X11/AnotherLevel/fvwmrc.m4";
                if [ -f "$tryfile" ]; then
                        RCFILE="$tryfile"
                        break
        fi
                done
...

should become:

 AnotherLevel)
                OPTIONS=""
                RCFILE=""
                for tryfile in "$HOME/.fvmw2rc.m4" "/etc/X11/AnotherLevel/fvwmrc.m4";
                <B>do</B>
                 if [ -f "$tryfile" ]; then
                        RCFILE="$tryfile"
                        break
                 fi
                done
...

Without the "do" statement, the Xsession file will not get executed at login, which causes the system to bounce back to the initial login screen.
[Append to This Answer]
Previous: (Answer) Why does my spell checker and Java not work in Netscape 4.5b?
Next: (Answer) How can I get an X window dump in TIFF, GIF, etc?
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=474
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo