Xclients File

Simon Beehre (Simon.Beehre@telecom.co.nz)
Tue, 12 Jan 1999 08:46:52 +1200


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_C4936555.1A7B2C53
Content-Type: text/plain
Content-Disposition: inline

Im trying to get afterstep 1.6.6 installed and i'am using redhat 5.1, and i
want to create my own Xclients file to start it up, but im not sure how to
do this. I tried changing a line in the Xclients to point to the new binary but
it didnt work. I can get afterstep running by typing startx
/usr/local/bin/afterstep but i'd rather do it the proper way! :) I've attached
my Xclients file if anyone want to look at it and tell me if i've done
anything wrong that would be great

Thanks 

Simon

--=_C4936555.1A7B2C53
Content-Type: text/plain
Content-Disposition: attachment; filename="xclients"
Content-Description: WordPerfect 4.2

#!/bin/bash

########################################################################
# -*- sh -*-                                                           #
#                                                                      #
# ~/.Xclients: used by startx (xinit) to start up a window manager and #
# any other clients you always want to start an X session with.        #
#                                                                      #
# feel free to edit this file to suit your needs.                      #
########################################################################

# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0
rm -f /tmp/fvwmrc* 2>/dev/null

# First thing - check the user preferences
if [ -f $HOME/.wm_style ] ; then
    WMSTYLE=`cat $HOME/.wm_style`
    case "$WMSTYLE" in 
	Afterstep*|AfterStep*)
	    # we have to start up afterstep
	    if [ -x /usr/local/bin/afterstep -a -f /usr/share/afterstep.old/wmconfig.conf ] ; then
		mkdir -p $HOME/GNUstep/Library/AfterStep
		wmconfig --output=afterstep --directories /usr/share/afterstep/wmconfig.conf 2>/dev/null
		env > "$HOME"/Xrootenv.0
		# if this works, we stop here
		eval "exec /usr/local/bin/afterstep" > "$HOME"/.AfterStep-errors 2>&1
	    fi
	    ;;
    esac
fi

# first, find an M4-enabled config file (such as 
# the one from AnotherLevel) for fvwm2 or fvwm95.
RCFILE=""
for tryfile in "$HOME/.fvwm2rc.m4" "/etc/X11/AnotherLevel/fvwm2rc.m4"; do
    if [ -f "$tryfile" ]; then
        RCFILE="$tryfile"
        break
    fi
done

# if it really exists, use it; if not, fvwm2 or fvwm95 will
# automagically look for a config file in the regular places.
if [ -n "$RCFILE" ]; then
    FVWMOPTIONS="-cmd 'FvwmM4 -debug $RCFILE'"
else
    FVWMOPTIONS=""
fi

# TheNextLevel is supposed to work
# with both fvwm95 and fvwm2
# (try fvwm95 first, then fvwm2).
for FVWMVER in 95 95-2 2; do
    if [ -n "$(type -path fvwm${FVWMVER})" ]; then
        env > "$HOME"/Xrootenv.0
        # if this works, we stop here
        eval "exec fvwm${FVWMVER} ${FVWMOPTIONS}" > "$HOME"/.FVWM${FVWMVER}-errors 2>&1
    fi
done

# gosh, neither fvwm95 nor fvwm2 is available;
# let's try regular fvwm (AnotherLevel doesn't work with fvwm1).
if [ -n "$(type -path fvwm)" ]; then
    # if this works, we stop here
    exec fvwm
fi

# wow, fvwm isn't here either ... 
# use twm as a last resort.
xterm &
exec twm









--=_C4936555.1A7B2C53--

--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.caldera.com/linuxcenter/forums/afterstep.html