/etc/X11/prefdm

Jmnote (토론 | 기여)님의 2014년 9월 7일 (일) 11:44 판 (→‎내용)
/etc/X11/prefdm

1 내용

#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin

# We need to source this so that the login screens get translated
[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n

# Run preferred X display manager
quit_arg=
preferred=
if [ -f /etc/sysconfig/desktop ]; then
	. /etc/sysconfig/desktop
	if [ "$DISPLAYMANAGER" = GNOME ]; then
		preferred=/usr/sbin/gdm
		quit_arg="--retain-splash"
	elif [ "$DISPLAYMANAGER" = KDE ]; then
		preferred=/usr/bin/kdm
	elif [ "$DISPLAYMANAGER" = WDM ]; then
		preferred=/usr/bin/wdm
	elif [ "$DISPLAYMANAGER" = XDM ]; then
	        preferred=/usr/bin/xdm
        elif [ -n "$DISPLAYMANAGER" ]; then
		preferred=$DISPLAYMANAGER
	else
		quit_arg="--retain-splash"
	fi
else
	quit_arg="--retain-splash"
fi

# shut down boot splash
/bin/plymouth quit $quit_arg

shopt -s execfail

[ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 </dev/null

# Fallbacks, in order
exec gdm "$@" >/dev/null 2>&1 </dev/null
exec kdm "$@" >/dev/null 2>&1 </dev/null

for pkg in $(rpm -q --qf "%{NAME}\n" --whatprovides "service(graphical-login)"| LC_ALL=C sort -u) ; do
	dm=$(rpm -q --provides $pkg | awk '/^service\(graphical-login\)/ { print $3 ; exit }')
	if [ -n "$dm" ]; then
		exec $dm "$@" >/dev/null 2>&1 </dev/null
	else
		exec $pkg "$@" >/dev/null 2>&1 </dev/null
	fi
done

# catch all exit error
exit 1

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}