Sunday, January 27, 2008

giant Xsession error logs fill drive. /etc/X11/Xsession

I had noticed a bug a while ago that there were hidden error log files in my home directory as
large as 25G in size!

the solution to that was
to modify the file


#old contensts were
#exec >>"$ERRFILE" 2>&1
#my modification
exec > "$errfile" 2>&1

1. who needs these X error logs anyway?
2. even if we want em, let up should _overwrite them_ not add to the tail!
they can get really large over months!

see this post at


This problem just should be fixed. A running Debian system just
kills itself by filling the hard disk with .xsession-errors
files. Unless, of course, the administrator or all users
know how to prevent it.

I fixed it by editing my /etc/X11/Xsession:

Changed this:
exec >>"$ERRFILE" 2>&1

to be like this:
exec >"$ERRFILE" 2>&1

Now the .xsession-errors file is initialized everytime when
a user logs in.

Best regards,

-- Harri --

No comments: