From 06be648de8598d8b0c5733d73fc4718cf2686161 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Sun, 19 Dec 1999 18:09:19 +0000 Subject: "Seethechangelog" --- bin/fndSession | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 bin/fndSession (limited to 'bin') diff --git a/bin/fndSession b/bin/fndSession new file mode 100755 index 0000000..baf45da --- /dev/null +++ b/bin/fndSession @@ -0,0 +1,66 @@ +#!/bin/sh +# fndSession (c) MandrakeSoft +# Chmouel Boudjnah + +LIST="SessionTypes" + +[ -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/$$.kdmrc && \ +mv /tmp/$$.kdmrc /usr/share/config/kdmrc -- cgit v1.2.1