aboutsummaryrefslogtreecommitdiffstats
path: root/prefdm
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-07-29 16:11:09 +0000
committerBill Nottingham <notting@redhat.com>1999-07-29 16:11:09 +0000
commit3427e2e1572b994155b883c5492e797b3383267a (patch)
treee60278c752a917548866c27db19d9fea450094a8 /prefdm
parentb59cac0d85822005f34c3d81f60bcb1ca150b8d6 (diff)
downloadinitscripts-3427e2e1572b994155b883c5492e797b3383267a.tar
initscripts-3427e2e1572b994155b883c5492e797b3383267a.tar.gz
initscripts-3427e2e1572b994155b883c5492e797b3383267a.tar.bz2
initscripts-3427e2e1572b994155b883c5492e797b3383267a.tar.xz
initscripts-3427e2e1572b994155b883c5492e797b3383267a.zip
add prefdm as a real file.
Diffstat (limited to 'prefdm')
-rwxr-xr-xprefdm26
1 files changed, 26 insertions, 0 deletions
diff --git a/prefdm b/prefdm
new file mode 100755
index 00000000..ff5219b7
--- /dev/null
+++ b/prefdm
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Set preferred X display manager link
+preferred=
+if [ -f /etc/sysconfig/desktop ]; then
+ if [ -n "grep GNOME /etc/sysconfig/desktop" ]; then
+ preferred=gdm
+ elif [ -n "grep KDE /etc/sysconfig/desktop" ]; then
+ preferred=kdm
+ elif [ -n "grep AnotherLevel /etc/sysconfig/desktop" ]; then
+ preferred=xdm
+ fi
+fi
+if [ -z "$preferred" ]; then
+ if which gdm >/dev/null 2>&1; then
+ preferred=gdm
+ elif which kdm >/dev/null 2>&1; then
+ preferred=kdm
+ elif which xdm >/dev/null 2>&1; then
+ preferred=xdm
+ fi
+fi
+if [ -n "$preferred" ] && which $preferred
+ exec `which $preferred` $*
+fi
+exit 1