1
0
Fork 0

x initialization fixes

This commit is contained in:
Luca Bilke 2023-02-07 16:00:19 +01:00
parent 0b6da97fa9
commit 627f78c5da
3 changed files with 11 additions and 13 deletions

View file

@ -47,7 +47,7 @@ authdisplay=${display:-:0}
mcookie=$(/usr/bin/mcookie) mcookie=$(/usr/bin/mcookie)
if [ -n "${mcookie+x}" ]; then if [ -z "${mcookie+x}" ]; then
echo "Couldn't create cookie" echo "Couldn't create cookie"
exit 1 exit 1
fi fi

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
stty onclr # stty icrnl
exec /usr/bin/Xorg -nolisten tcp "$@" vt"$XDG_VTNR" exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR

View file

@ -10,19 +10,16 @@ SYSRESOURCES=/etc/X11/Xresources
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources" ] && USRRESOURCES=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources || USRRESOURCES=$HOME/.Xresources [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources" ] && USRRESOURCES=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources || USRRESOURCES=$HOME/.Xresources
SYSSESSIONDIR=/etc/X11/Xsession.d SYSSESSIONDIR=/etc/X11/Xsession.d
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession" ] && USERXSESSION=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession || USERXSESSION=$HOME/.xsession [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/xorg/" ] && ERRFILE=${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors || ERRFILE=$HOME/.xsession-errors
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xsession" ] && ALTUSERXSESSION=${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xsession || ALTUSERXSESSION=$HOME/.Xsession
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}X11/xsessionrc" ] && USERXSESSIONRC=${XDG_CONFIG_HOME:-$HOME/.config}X11/xsessionrc || USERXSESSIONRC=$HOME/.xsessionrc
[ -r "${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors" ] && ERRFILE=${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors || ERRFILE=$HOME/.xsession-errors
message () { message () {
# pretty-print messages of arbitrary length; use xmessage if it # pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set # is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*" MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2 echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then # if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file - # echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi # fi
} }
message_nonl () { message_nonl () {
@ -30,9 +27,9 @@ message_nonl () {
# xmessage if it is available and $DISPLAY is set # xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*" MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2; echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then # if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file - # echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi # fi
} }
errormsg () { errormsg () {
@ -113,6 +110,7 @@ SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then if [ -n "$SESSIONFILES" ]; then
set +e set +e
for SESSIONFILE in $SESSIONFILES; do for SESSIONFILE in $SESSIONFILES; do
message "Executing $SESSIONFILE"
. $SESSIONFILE . $SESSIONFILE
done done
set -e set -e