Magellan Linux

Contents of /trunk/xorg/startxdm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 62 - (show annotations) (download)
Sun Feb 19 15:04:15 2006 UTC (18 years, 2 months ago) by niro
File size: 1513 byte(s)
added more login-managers

1 #!/bin/bash
2 # $Header: /root/magellan-cvs/src/xorg/startxdm,v 1.2 2006-02-19 15:03:35 niro Exp $
3
4 source /etc/profile
5 source /etc/rc.config
6
7 # enable antialias by default for gnome
8 export GDK_USE_XFT=1
9
10 get_login() {
11 case "${GLOGIN}" in
12 kdm|KDM)
13 GLOGINCMD="$(which kdm 2> /dev/null)"
14 if [ ! -f "${GLOGINCMD}" ]
15 then
16 echo "Failure: KDE Login Manager not found."
17 exit 1
18 fi
19 ;;
20
21 gdm|GDM)
22 GLOGINCMD="$(which gdm 2> /dev/null)"
23 if [ ! -f "${GLOGINCMD}" ]
24 then
25 echo "Failure: GNOME Login Manager not found."
26 exit 1
27 fi
28 ;;
29
30 entrance*|ENTRANCE*)
31 GLOGINCMD="$(which entranced 2> /dev/null)"
32 if [ ! -f "${GLOGINCMD}" ]
33 then
34 echo "Failure: Enlightenment Login Manager not found."
35 exit 1
36 fi
37 ;;
38
39 wdm|WDM)
40 GLOGINCMD="$(which wdm 2> /dev/null)"
41 if [ ! -f "${GLOGINCMD}" ]
42 then
43 echo "Failure: Windowmaker Login Manager not found."
44 exit 1
45 fi
46 ;;
47
48 xdm|XDM)
49 GLOGINCMD="$(which xdm 2> /dev/null)"
50 if [ ! -f "${GLOGINCMD}" ]
51 then
52 echo "Failure: XDM Login Manager not found."
53 exit 1
54 fi
55 ;;
56
57 *)
58 GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)"
59 if [ ! -f "${GLOGINCMD}" ]
60 then
61 echo "Failure: \"${GLOGIN}\" Login Manager not found."
62 exit 1
63 fi
64 ;;
65 esac
66 }
67
68
69 if [ -n "${GLOGIN}" ]
70 then
71 get_login
72 /sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD}
73 retval="$?"
74 wait; sleep 2
75
76 if [ "${retval}" -ne 0 ]
77 then
78 echo "Could not start your Displaymanager"
79 killall -9 ${GLOGIN##*/}
80 fi
81 fi

Properties

Name Value
svn:executable *