stop logging into ~/.xsession-errors

Glynn Clements glynn at
Fri Jul 6 17:03:01 PDT 2007

reitenbach_pub at wrote:

> my xorg went crazy, and filled up my home directory with millions of error 
> messages in .xsession-errors. It only took half an hour to fill my home 
> directory, then all the other applications went crazy.
> Do I can tell the xorg to not write into that file if the size is larger than 
> a defined maximum, or just not write in there at all?
> I am running xorg-x11-6.9.0-50.17 on a suse 10.1.

This is implemented by the X startup scripts; e.g. on my system,
/etc/X11/xdm/Xsession has:

for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
	if ( cp /dev/null "$errfile" 2> /dev/null )
		chmod 600 "$errfile"
		exec > "$errfile" 2>&1

Assuming that you have something similar, you can either disable that
section of code, or create all of the files which it tries then remove
write permission from them.

If you can't find the relevant script, you'll need to ask on a SuSE
list; vendors invariably customise the scripts for their distribution.

Glynn Clements <glynn at>

More information about the xorg mailing list