aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorDavid Baudens <baudens@mandriva.com>1999-12-21 01:00:27 +0000
committerDavid Baudens <baudens@mandriva.com>1999-12-21 01:00:27 +0000
commitb7ad0e3f40f920d0885c352b89071303bfcdcbf0 (patch)
tree1feea084c3f002d1edf06c22dfdb0c668ffdfe22 /sbin
parenteb1bca276fee50c1e11585f4a2950cfb475fb584 (diff)
downloadcommon-data-b7ad0e3f40f920d0885c352b89071303bfcdcbf0.tar
common-data-b7ad0e3f40f920d0885c352b89071303bfcdcbf0.tar.gz
common-data-b7ad0e3f40f920d0885c352b89071303bfcdcbf0.tar.bz2
common-data-b7ad0e3f40f920d0885c352b89071303bfcdcbf0.tar.xz
common-data-b7ad0e3f40f920d0885c352b89071303bfcdcbf0.zip
Add some WM.
Sort in alphabetic order-
Diffstat (limited to 'sbin')
-rw-r--r--sbin/Xsession108
-rwxr-xr-xsbin/fndSession97
2 files changed, 184 insertions, 21 deletions
diff --git a/sbin/Xsession b/sbin/Xsession
new file mode 100644
index 0000000..a83a953
--- /dev/null
+++ b/sbin/Xsession
@@ -0,0 +1,108 @@
+#!/bin/bash -login
+# (c) 1999 Red Hat Software, Inc.
+# Modification for Linux-Mandrake by Chmouel Boudjnah <chmouel@mandraksoft.com>
+
+xsetroot -solid #356390
+
+# redirect errors to a file in user's home directory if we can
+for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
+do
+if ( cp /dev/null "$errfile" 2> /dev/null )
+then
+chmod 600 "$errfile"
+exec > "$errfile" 2>&1
+break
+fi
+done
+
+# clean up after xbanner
+if [ -f /usr/X11R6/bin/freetemp ]; then
+freetemp
+fi
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
+sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
+
+# merge in defaults and keymaps
+if [ -f $sysresources ]; then
+xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+xmodmap $sysmodmap
+fi
+
+if [ -f $userresources ]; then
+xrdb -merge $userresources
+fi
+
+if [ -f $usermodmap ]; then
+xmodmap $usermodmap
+fi
+
+# now, we see if xdm/gdm/kdm has asked for a specific environment
+case $# in
+1)
+case $1 in
+KDE)
+exec startkde
+;;
+Gnome)
+exec gnome-session
+;;
+AfterStep)
+exec /usr/X11R6/bin/afterstep
+;;
+AnotherLevel)
+# we assume that switchdesk is installed.
+exec /usr/share/apps/switchdesk/Xclients.anotherlevel
+;;
+BlackBox)
+exec /usr/X11R6/bin/bbdrake
+;;
+# Work but some end users don't understant how it works. So, we disable it.
+#BlackBox/KDE)
+#exec /usr/X11R6/bin/bbdrake_kde
+#;;
+Enlightenment)
+exec /usr/bin/enlightenment
+;;
+FVWM)
+exec /usr/X11R6/bin/fvwm
+;;
+FVWM2)
+exec /usr/X11R6/bin/fvwm2
+;;
+IceWM)
+exec /usr/X11R6/bin/icewm
+;;
+MWM)
+exec /usr/X11R6/mwm
+;;
+WindowMaker)
+[ -f $HOME/GNUstep/Defaults/WindowMaker ] || {
+/usr/X11R6/bin/wmaker.inst --batch
+}
+exec /usr/X11R6/bin/wmaker
+;;
+XFCE)
+exec /usr/X11R6/bin/xfwm
+;;
+FailSafe)
+exec xterm -geometry 80x24-0-0
+;;
+esac
+esac
+
+# otherwise, take default action
+if [ -x "$HOME/.xsession" ]; then
+exec "$HOME/.xsession"
+elif [ -x "$HOME/.Xclients" ]; then
+exec "$HOME/.Xclients"
+elif [ -x /etc/X11/xinit/Xclients ]; then
+exec /etc/X11/xinit/Xclients
+else
+exec xsm
+fi
diff --git a/sbin/fndSession b/sbin/fndSession
index 23c142c..6cbcb1e 100755
--- a/sbin/fndSession
+++ b/sbin/fndSession
@@ -3,65 +3,120 @@
# Chmouel Boudjnah <chmouel@mandrakesoft.com>
LIST="SessionTypes"
-TMP=`mktemp /tmp/.kdm.XXXXXX`
[ -x /usr/bin/kde ] && {
-LIST="$LIST=kde"; FIRST=yes
+LIST="$LIST=KDE"; FIRST=yes
}
[ -x /usr/bin/gnome-session ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;gnome"
+ LIST="$LIST;Gnome"
else
- LIST="$LIST=gnome"
+ LIST="$LIST=Gnome"
FIRST="yes"
fi
}
+
+[ -x /usr/X11R6/bin/afterstep ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;AfterStep"
+ else
+ LIST="$LIST=AfterStep"
+ FIRST="yes"
+ fi
+}
+
+
[ -e /usr/share/apps/switchdesk/Xclients.anotherlevel ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;anotherlevel"
+ LIST="$LIST;AnotherLevel"
else
- LIST="$LIST=anotherlevel"
+ LIST="$LIST=AnotherLevel"
FIRST="yes"
fi
}
-[ -x /usr/X11R6/bin/wmaker ] && {
+[ -x /usr/X11R6/bin/bbdrake ] && {
+ if [ "$FIRST" = "yes" ] ; then
+ LIST="$LIST;BlackBox"
+ FIRST="yes"
+ fi
+}
+
+# Work but some end users don't understant how it works. So, we disable it.
+#[ -x /usr/X11R6/bin/bbdrake_kde ] && {
+# if [ "$FIRST" = "yes" ] ; then
+# LIST="$LIST;BlackBox/KDE"
+# FIRST="yes"
+# fi
+#}
+
+[ -x /usr/bin/enlightenment ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;WindowMaker"
+ LIST="$LIST;Enlightenment"
else
- LIST="$LIST=WindowMaker"
+ LIST="$LIST=Enlightenment"
FIRST="yes"
fi
}
-[ -x /usr/X11R6/bin/afterstep ] && {
+
+[ -x /usr/X11R6/bin/fvwm ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;AfterStep"
+ LIST="$LIST;FVWM"
else
- LIST="$LIST=AfterStep"
+ LIST="$LIST=FVWM"
FIRST="yes"
fi
}
+
+[ -x /usr/X11R6/bin/fvwm2 ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;FVWM2"
+ else
+ LIST="$LIST=FVWM2"
+ FIRST="yes"
+ fi
+}
+
[ -x /usr/X11R6/bin/icewm ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;Icewm"
+ LIST="$LIST;IceWM"
else
- LIST="$LIST=Icewm"
+ LIST="$LIST=IceWM"
FIRST="yes"
fi
}
-[ -x /usr/bin/xfce ] && {
+
+[ -x /usr/X11R6/bin/mwm ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;MWM"
+ else
+ LIST="$LIST=MWM"
+ FIRST="yes"
+ fi
+}
+
+[ -x /usr/X11R6/bin/wmaker ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;WindowMaker"
+ else
+ LIST="$LIST=WindowMaker"
+ FIRST="yes"
+ fi
+}
+
+[ -x /usr/X11R6/bin/startxfce ] && {
if [ "$FIRST" = "yes" ];then
- LIST="$LIST;Xfce"
+ LIST="$LIST;XFCE"
else
- LIST="$LIST=Xfce"
+ LIST="$LIST=XFCE"
FIRST="yes"
fi
}
if [ $FIRST = "yes" ];then
- LIST="$LIST;default;failsafe;"
+ LIST="$LIST;default;FailSafe;"
else
- LIST="$LIST=default;failsafe;"
+ LIST="$LIST=default;DailSafe;"
fi
-sed "s/^SessionTypes.*/"$LIST"/" /usr/share/config/kdmrc > $TMP && \
-mv $TMP /usr/share/config/kdmrc
+sed "s/^SessionTypes.*/"$LIST"/" /usr/share/config/kdmrc > /tmp/$$.kdmrc && \
+mv /tmp/$$.kdmrc /usr/share/config/kdmrc