#!/bin/bash # $Header: /root/magellan-cvs/src/xorg/startxdm,v 1.2 2006-02-19 15:03:35 niro Exp $ source /etc/profile source /etc/rc.config # enable antialias by default for gnome export GDK_USE_XFT=1 get_login() { case "${GLOGIN}" in kdm|KDM) GLOGINCMD="$(which kdm 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: KDE Login Manager not found." exit 1 fi ;; gdm|GDM) GLOGINCMD="$(which gdm 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: GNOME Login Manager not found." exit 1 fi ;; entrance*|ENTRANCE*) GLOGINCMD="$(which entranced 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: Enlightenment Login Manager not found." exit 1 fi ;; wdm|WDM) GLOGINCMD="$(which wdm 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: Windowmaker Login Manager not found." exit 1 fi ;; xdm|XDM) GLOGINCMD="$(which xdm 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: XDM Login Manager not found." exit 1 fi ;; *) GLOGINCMD="$(which ${GLOGIN} 2> /dev/null)" if [ ! -f "${GLOGINCMD}" ] then echo "Failure: \"${GLOGIN}\" Login Manager not found." exit 1 fi ;; esac } if [ -n "${GLOGIN}" ] then get_login /sbin/start-stop-daemon --start --quiet --exec ${GLOGINCMD} retval="$?" wait; sleep 2 if [ "${retval}" -ne 0 ] then echo "Could not start your Displaymanager" killall -9 ${GLOGIN##*/} fi fi