Bug#904698: sddm fails to login with user shell fish and bash completion installed
diff --git a/data/scripts/Xsession b/data/scripts/Xsession
index c7fa214..c29611b 100755
--- a/data/scripts/Xsession
+++ b/data/scripts/Xsession
@@ -10,13 +10,13 @@ case $SHELL in
*/bash)
[ -z "$BASH" ] && exec $SHELL $0 "$@"
set +o posix
- [ -f /etc/profile ] && . /etc/profile
+ [ -f /etc/profile ] && . /etc/profile | true
if [ -f $HOME/.bash_profile ]; then
- . $HOME/.bash_profile
+ . $HOME/.bash_profile | true
elif [ -f $HOME/.bash_login ]; then
- . $HOME/.bash_login
+ . $HOME/.bash_login | true
elif [ -f $HOME/.profile ]; then
- . $HOME/.profile
+ . $HOME/.profile | true
fi
;;
*/zsh)
@@ -24,10 +24,10 @@ case $SHELL in
[ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
zhome=${ZDOTDIR:-$HOME}
# zshenv is always sourced automatically.
- [ -f $zdir/zprofile ] && . $zdir/zprofile
- [ -f $zhome/.zprofile ] && . $zhome/.zprofile
- [ -f $zdir/zlogin ] && . $zdir/zlogin
- [ -f $zhome/.zlogin ] && . $zhome/.zlogin
+ [ -f $zdir/zprofile ] && . $zdir/zprofile | true
+ [ -f $zhome/.zprofile ] && . $zhome/.zprofile |true
+ [ -f $zdir/zlogin ] && . $zdir/zlogin | true
+ [ -f $zhome/.zlogin ] && . $zhome/.zlogin | true
emulate -R sh
;;
*/csh|*/tcsh)
@@ -39,26 +39,26 @@ case $SHELL in
rm -f $xsess_tmp
;;
*/fish)
- [ -f /etc/profile ] && . /etc/profile
+ [ -f /etc/profile ] && . /etc/profile | true
xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX`
$SHELL --login -c "/bin/sh -c 'export -p' > $xsess_tmp"
. $xsess_tmp
rm -f $xsess_tmp
;;
*) # Plain sh, ksh, and anything we do not know.
- [ -f /etc/profile ] && . /etc/profile
- [ -f $HOME/.profile ] && . $HOME/.profile
+ [ -f /etc/profile ] && . /etc/profile | true
+ [ -f $HOME/.profile ] && . $HOME/.profile | true
;;
esac
-[ -f /etc/xprofile ] && . /etc/xprofile
-[ -f $HOME/.xprofile ] && . $HOME/.xprofile
+[ -f /etc/xprofile ] && . /etc/xprofile | true
+[ -f $HOME/.xprofile ] && . $HOME/.xprofile | true
# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
- . "$i"
+ . "$i" | true
fi
done
fi
@@ -77,7 +77,7 @@ if [ -d "$xsessionddir" ]; then
script="$xsessionddir/$i"
echo "Loading X session script $script"
if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then
- . "$script"
+ . "$script" | true
fi
done
fi
Reply to: