diff options
Diffstat (limited to 'prefdm')
-rwxr-xr-x | prefdm | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -35,10 +35,14 @@ 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 -exec wdm "$@" >/dev/null 2>&1 </dev/null -exec xdm "$@" >/dev/null 2>&1 </dev/null +for pkg in $(rpm -q --qf "%{NAME}\n" --whatprovides "service(graphical-login)") ; 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 |