[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

.xsession-errors file of 253G



Hi,
I wanted to claim the all time maximum size for the .xsession-errors file. 

My home  partition has a raid1 of 2 400G hard drives. Just today my home partition became 100% full.
I see that this was already discussed last year on debian-user so I just post it to let people know
who will come across it again.

My main problem is not noticing it till today! Not checking my error logs :).

I see that the setting in /etc/X11/Xsession:

******************
ERRFILE=$HOME/.xsession-errors

# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
  [ ! -L "$ERRFILE" ]; then
  chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
  if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
    message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
             "\"$ERRFILE\"; look for session log/errors in" \
             "\"$TMPDIR/xsession-$USER\"."
  fi
else
  errormsg "unable to create X session log/error file; aborting."
fi

exec >>"$ERRFILE" 2>&1

***************

now we can either 

1) modify the line

exec >>"$ERRFILE" 2>&1
to 
exec >"$ERRFILE" 2>&1

which will overwrite the xsession-errors file on each start of X,

(idea from google somewhere)


or else  

2) follow the idea of 
http://www.skolelinux.no/~klaus/newnotater/x2548.html

if we don't look at errors (bad bad) 
and simply replace 
the stanza above with

**************
errfile="/dev/null"
exec > "$errfile" 2>&1
***************

Or else 

3) set  up log rotation of the .xsession-errors files in userland directories.

Should a bug report be filed?

Mitchell



Reply to: