It's possible to install SDDM with very little other X11 baggage, like xterm. In such a minimal install situation, SDDM will still come up and offer "User Session" -- and that session will fail, because there's nothing to run. Depend on xmessage, and then fall back to xinit's default script and if **that** isn't there, show the user a message instead of just sitting there with a black screen and an X cursor. PR: 256648 Reported by: Graham Perrin
22 lines
644 B
Bash
22 lines
644 B
Bash
#!/bin/sh
|
|
#
|
|
# Runs the user's .xinitrc (at this point, .xsession has already
|
|
# been sourced). If there is no .xinitrc, but xinit is installed,
|
|
# then there is a default script. If neither is installed,
|
|
# display a message.
|
|
|
|
RC="$HOME/.xinitrc"
|
|
if [ ! -f "$RC" ] ; then
|
|
RC="@@LOCALBASE@@/etc/X11/xinit/xinitrc"
|
|
# But that one needs at least xterm to do something useful
|
|
if [ ! -x @@LOCALBASE@@/bin/xterm ] ; then
|
|
RC=""
|
|
fi
|
|
fi
|
|
|
|
if [ -n "$RC" -a -f "$RC" ] ; then
|
|
test -x "$RC" && exec "$RC"
|
|
test -f "$RC" && exec /bin/sh "$RC"
|
|
else
|
|
exec @@LOCALBASE@@/bin/xmessage -geometry +0+0 "There is no user-session or usable default with xterm"
|
|
fi
|