Bug#287876: Bug#276545: Bug#287876: File $HOME/.xsession-errors grows very large
Wow, this is an old bug that seemingly got forgotten about!
I've just added locally a change to at least rotate the
.xsession-errors file at startup, to stop me wasting gigabytes of disk
on errors that I don't care about long-term:
diff --git a/X11/Xsession b/X11/Xsession
index 6ad7d6e..8302900 100755
--- a/X11/Xsession
+++ b/X11/Xsession
@@ -60,6 +60,10 @@ USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors
+if [ -f "$ERRFILE" ] && [ ! -L "$ERRFILE" ]; then
+ mv -f "$ERRFILE" "$ERRFILE".old
+fi
+
# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
[ ! -L "$ERRFILE" ]; then
--
Steve McIntyre, Cambridge, UK. steve@einval.com
The two hard things in computing:
* naming things
* cache invalidation
* off-by-one errors -- Stig Sandbeck Mathisen
Reply to: