aboutsummaryrefslogtreecommitdiff
path: root/x11/sddm/files/xinit-session
blob: d10125d73770d5458bc3080d63738418e4444017 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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