aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/fndSession
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>1999-12-19 18:09:19 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>1999-12-19 18:09:19 +0000
commit06be648de8598d8b0c5733d73fc4718cf2686161 (patch)
treeed3c78c48bd154dbde964bbd9530b2682a8686b9 /sbin/fndSession
parent27a46978e80995b757cdba0d068efb0a1cbfa39f (diff)
downloadcommon-data-06be648de8598d8b0c5733d73fc4718cf2686161.tar
common-data-06be648de8598d8b0c5733d73fc4718cf2686161.tar.gz
common-data-06be648de8598d8b0c5733d73fc4718cf2686161.tar.bz2
common-data-06be648de8598d8b0c5733d73fc4718cf2686161.tar.xz
common-data-06be648de8598d8b0c5733d73fc4718cf2686161.zip
"Seethechangelog"
Diffstat (limited to 'sbin/fndSession')
-rwxr-xr-xsbin/fndSession67
1 files changed, 67 insertions, 0 deletions
diff --git a/sbin/fndSession b/sbin/fndSession
new file mode 100755
index 0000000..23c142c
--- /dev/null
+++ b/sbin/fndSession
@@ -0,0 +1,67 @@
+#!/bin/sh
+# fndSession (c) MandrakeSoft
+# Chmouel Boudjnah <chmouel@mandrakesoft.com>
+
+LIST="SessionTypes"
+TMP=`mktemp /tmp/.kdm.XXXXXX`
+
+[ -x /usr/bin/kde ] && {
+LIST="$LIST=kde"; FIRST=yes
+}
+[ -x /usr/bin/gnome-session ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;gnome"
+ else
+ LIST="$LIST=gnome"
+ FIRST="yes"
+ fi
+}
+[ -e /usr/share/apps/switchdesk/Xclients.anotherlevel ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;anotherlevel"
+ else
+ LIST="$LIST=anotherlevel"
+ 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/afterstep ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;AfterStep"
+ else
+ LIST="$LIST=AfterStep"
+ FIRST="yes"
+ fi
+}
+[ -x /usr/X11R6/bin/icewm ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;Icewm"
+ else
+ LIST="$LIST=Icewm"
+ FIRST="yes"
+ fi
+}
+[ -x /usr/bin/xfce ] && {
+ if [ "$FIRST" = "yes" ];then
+ LIST="$LIST;Xfce"
+ else
+ LIST="$LIST=Xfce"
+ FIRST="yes"
+ fi
+}
+
+if [ $FIRST = "yes" ];then
+ LIST="$LIST;default;failsafe;"
+else
+ LIST="$LIST=default;failsafe;"
+fi
+sed "s/^SessionTypes.*/"$LIST"/" /usr/share/config/kdmrc > $TMP && \
+mv $TMP /usr/share/config/kdmrc