aboutsummaryrefslogtreecommitdiffstats
path: root/prefdm
diff options
context:
space:
mode:
authorThan Ngo <than@redhat.com>2000-08-22 13:04:56 +0000
committerThan Ngo <than@redhat.com>2000-08-22 13:04:56 +0000
commite95ca24cd9d5a035c71e57317179be2988843235 (patch)
treeef9f1aa82a557162c71293a73c2ff4c689b1c943 /prefdm
parent4bc6a29959062d84efc2199d3db1c06ffaed2f96 (diff)
downloadinitscripts-e95ca24cd9d5a035c71e57317179be2988843235.tar
initscripts-e95ca24cd9d5a035c71e57317179be2988843235.tar.gz
initscripts-e95ca24cd9d5a035c71e57317179be2988843235.tar.bz2
initscripts-e95ca24cd9d5a035c71e57317179be2988843235.tar.xz
initscripts-e95ca24cd9d5a035c71e57317179be2988843235.zip
* Add KDE2 supportr5-47
Diffstat (limited to 'prefdm')
-rwxr-xr-xprefdm15
1 files changed, 9 insertions, 6 deletions
diff --git a/prefdm b/prefdm
index 253f3101..9654ea0f 100755
--- a/prefdm
+++ b/prefdm
@@ -18,12 +18,15 @@ fi
preferred=
if [ -f /etc/sysconfig/desktop ]; then
- if grep -q GNOME /etc/sysconfig/desktop 2>/dev/null; then
+ source /etc/sysconfig/desktop >/dev/null 2>&1
+ if [ "$DESKTOP" = GNOME ]; then
preferred=gdm
- elif grep -q KDE /etc/sysconfig/desktop 2> /dev/null; then
- preferred=kdm
- elif grep -q AnotherLevel /etc/sysconfig/desktop 2> /dev/null; then
- preferred=xdm
+ elif [ "$DESKTOP" = KDE -o "$DESKTOP" = KDE1 ]; then
+ preferred=/usr/bin/kdm
+ elif [ "$DESKTOP" = KDE2 ]; then
+ preferred=/usr/lib/kde2/bin/kdm
+ elif [ "$DESKTOP" = AnotherLevel ] ; then
+ preferred=/usr/X11R6/bin/xdm
fi
fi
if [ -z "$preferred" ]; then
@@ -38,4 +41,4 @@ fi
if [ -n "$preferred" ] && which $preferred >/dev/null 2>&1; then
exec `which $preferred` $*
fi
-exit 1
+exit 1