From b5092447ea3b31afa45340821aed14d6e51a8392 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 28 Jan 2015 11:06:46 +0100 Subject: [PATCH 1/1] clean up errfile --- .xsession | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.xsession b/.xsession index 2550f2b..1c92e34 100755 --- a/.xsession +++ b/.xsession @@ -1,5 +1,18 @@ #!/bin/zsh --login +RUNDIR="/run/user/$(id -u)" +mkdir -m700 -p "$RUNDIR" +NEW_ERRFILE=$RUNDIR/xsession-errors +if [ -f "$ERRFILE" ]; then + mv "$ERRFILE" $NEW_ERRFILE +elif [ -L /tmp/xsession-$LOGNAME ]; then + mv $(readlink -f /tmp/xsession-$LOGNAME) $NEW_ERRFILE + rm /tmp/xsession-$LOGNAME +fi +chmod 600 $NEW_ERRFILE +ln -sf $NEW_ERRFILE $HOME/.xsession-errors +exec >>$NEW_ERRFILE 2>&1 + set -u while :; do -- 2.39.5