- in to the terabytes! (I've literally had my whole hard disk - 1.5TB - filled with this line several times now). Of course it will take hours to get to TB log file - nevertheless this behavior can (and has caused) data loss! In my case, I have a MythTV setup also on the same computer, and the recordings can't be made of course, if the hard disk is full.

I have no idea which program is causing the first line, I believe it might be nepomuk (although I have that peace of nice software disabled) or Clementine's Spotify plugin.

Via Google, I can find several users looking for a way to disable the file - but none of the workaround I've found apply for Gentoo, mainly because of different layout in /etx/X11 - I just don't know which file to edit and how! (most of the problems arise from the file being re-created at login). Has anyone disabled .xsession-errors, and if, how did you do it? Or does anyone know how to disable it - i.e. redirect the spam into /dev/null?.

Also, IMNSHO, I think the file should be disabled by default! I've used differen't Linux distributions for years, and didn't even know about the file until now. Now, that I look into the file - there's no way of telling, which line is caused by which program. Also, just googling it tells that the file is causing problems (the same problem I'm facing) but no solutions to any one!

Of course, one could find the program that is causing the spamming of the file, but that won't solve the underlaying problem. Also, in my case, the two lines above are the most common ones - even without them, the file would be in the hundreds of megabytes range just after a few hours of use.

About data loss: Actually, the situation with MythTV recordings was worse than I thought - MythTV has deleted all my recordings! .

It has automatic deleting on (if hard disk is filled) of old recordings according to priority! I guess I have to adjust my MythTV settings, or set up quotas for the regular user(s), or something... for not allowing this to happen again.

Never though my whole hard disk (or /home partition) would get filled (at least not in this manner)._________________- Ville

From what I've read on other forums, I believe that doing the above causes all the error messages being diverted into one of the files in /var/tmp instead - which is even worse, since /var/tmp is often tmpfs (as it is in my case). So, instead of hard disk, memory will get filled up .

The behaviour is, I believe, if one of the possible error files (seems tha alternatives are: "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" - from /etc/X11/Sessions/Xsession or KDE-4) - is not writeable and re-creatable by root, one of the other is used, until a writeable one is found.

I will however, try your suggestion and report what happens. Thanks in any case!_________________- Ville

Chattr +1 causes the file size to stay at 0 (or whatever it is), but instead the errors will be directed to /tmp/xerr-[LOGIN]-:0 - which is bad indeed !

toralf wrote:

something like

Code:

export WINEDEBUG=-all

might help a little bit ?

I moved .wine out of the way (well, it was about time since that one dated years back from another Gentoo computer, and had become quite convoluted I believe) and now I don't get the error anymore (at least for time being). But I will try to remember the WINEDEBUG trick.

As for deleting the file - it will disappear from the directory, sure, but it will still be using the disk space as long as any process has the file open. So the space won't be freed up unless one logs out (or, restarts X to be more specific) - and, in my case I even needed to kill nepomukserver (which I have disabled, why is it running?) and gam_server by hand, since the processes just wouldn't stop even if I stopped xdm (or kdm in my case) - if I had run out of disk space. The processes do stop if the log file had not had time to fill the entire hard disk.

I'm not sure how the writing of the .xsession-errors is handled, if every process opens it individually, I believe deleting it at login will prevent new processes from writing to it. But if there's some kind of log relaying (not sure what's the right word here) in use, and the writing process has already started, it won't work. I'm afraid the latter is the case - since, IIRC deleting it at login was already tried at some other discussion I found - but I will try it anyways. Also, there's no point - and no way - in deleting it repeatedly since it is only created once (at every login). It is not re-created during an X session.

Will be busy for the next day or two so I will get back to you later. Thanks anyways!_________________- Ville

Cleaning .wine seems to make .xsession-errors behave, it does not grow to ridiculous sizes anymore (however, the file is still useless! I guess it is just a matter of time until some other application starts to misbehave...).

Thanks for the truncate tip, publiosulpicio. I will remember it if(or when) this problem re-surfaces again ._________________- Ville

What exactly is filling up the file is what should be most interesting, methinks.

With regards to Wine, it certainly can produce a lot of fixme-messages, but those normally go to stderr, so it looks like something must be redirecting it to ~/.xsession-errors, I think. The 'fix' for that in particular can indeed be something like what mentioned above (making use of the WINEDEBUG environment variable).

I often wondered why I never had this particular file myself, and as I was looking into this now, I discerned that it's probably because I do not run any display/log-in mangers, such as gnome-base/gdm, which I think might be a plausible culprit here (see for example: Comment 45 for bug 60448bugs.launchpad.net, originally reported in 2006).

This is a problem that come from the use of a display manager to open an X session. The $HOME/.xsession-errors is the file used by the user applications to 'throw' their log messages. My little contribution is that

Code:

echo "" > $HOME/.xsession-errors

will empty the file. There is an xorg.conf option

Code:

Option "Log" "string"
This option controls whether the log is flushed and/or synced to disk after each message. Possible values are flush or sync. Unset by default.

Is this option apply only to Xorg itself and not to Xorg clients? This is what I think, but you can allow it a try.

Code:

Section "ServerFlags"
...
Option "Log "flush"
...
EndSection

There are several ways to control the size of that file. One is to create a file system with a fixed size in $HOME/.xsession-errors and mount it.

My last idea is to propose to open a user session in a virtual character terminal and use startx to open an X session. All logs go to the virtual character terminal._________________Paul