From ae1c961c048e6325b1640f67384d33e2e06341ff Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 3 Feb 2022 07:36:01 +0100 Subject: [PATCH 1/1] store temp xsession errors file on cleanup --- .xsession | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.xsession b/.xsession index 1c92e34..ea1683e 100755 --- a/.xsession +++ b/.xsession @@ -11,6 +11,15 @@ elif [ -L /tmp/xsession-$LOGNAME ]; then fi chmod 600 $NEW_ERRFILE ln -sf $NEW_ERRFILE $HOME/.xsession-errors + +TRAPS="0 1 2 3 4 5 6 7 8 10 11 12 13 14 15" +cleanup() { + rm -f $HOME/.xsession-errors + mv $NEW_ERRFILE $HOME/.xsession-errors + trap - $TRAPS +} +trap cleanup $TRAPS + exec >>$NEW_ERRFILE 2>&1 set -u -- 2.39.5