Hi, is there a way to change the log level for .xsession-errors? At the moment it seems every action of every program is logged into this file and this file grows at a rate of nearly 1 MB per hour. So if the system is up for a few days this file grows beyond 100MB. And if there really was an error it would be hard to find it. Thanks Mario
Mario Streiber writes:
is there a way to change the log level for .xsession-errors? At the moment it seems every action of every program is logged into this file and this file grows at a rate of nearly 1 MB per hour. So if the system is up for a few days this file grows beyond 100MB. And if there really was an error it would be hard to find it.
That file is not written by just one program. Rather it's a "dump" for any output from programs that runs under the X session. As such there is no single "switch" to change the log level. If this file is growing too rapidly you might want to check if there is a particular program that's generating unusually verbose output (and is potentially having a problem), and fix that. Otherwise, you could always set up a cron script to automatically clean up this file periodically. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
Ti Kan's Message from Mon October 18 2004 11:07:
Mario Streiber writes:
is there a way to change the log level for .xsession-errors? At the moment it seems every action of every program is logged into this file and this file grows at a rate of nearly 1 MB per hour. So if the system is up for a few days this file grows beyond 100MB. And if there really was an error it would be hard to find it.
That file is not written by just one program. Rather it's a "dump" for any output from programs that runs under the X session. As such there is no single "switch" to change the log level.
If this file is growing too rapidly you might want to check if there is a particular program that's generating unusually verbose output (and is potentially having a problem), and fix that.
There are lots of different processes that periodically write their messages there: kmail, kio, khotkeys... As far as I can see only informational messages, no errors. But I think I did my calculation wrong. I thought .xsession-errors is reopened at login with a size of zero bytes, and I found it with a size of 2MB after a two hour login time. Checking now after 4 hours, the file is not 4MB but only 2,15MB. Apparently the file is not reset at login time, so it grew to its current size over a longer period.
Otherwise, you could always set up a cron script to automatically clean up this file periodically.
Maybe I should remove (or rename) it everytime I log out. Does anyone know a good place for such a command which is invoked automatically at logout? Thanks Mario
Mario Streiber writes:
...
Otherwise, you could always set up a cron script to automatically clean up this file periodically.
Maybe I should remove (or rename) it everytime I log out. Does anyone know a good place for such a command which is invoked automatically at logout?
Yes. If you're running KDE, create a directory ~/.kde/shutdown and then put a shell script in there, let's call it "kdeshut". In the script add the lines: #!/bin/sh
$HOME/.xsession-errors
Make the file executable. It will be run automatically when you log out. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
Maybe I should remove (or rename) it everytime I log out. Does anyone know a good place for such a command which is invoked automatically at logout?
Yes. If you're running KDE, create a directory ~/.kde/shutdown and then put a shell script in there, let's call it "kdeshut". In the script add the lines:
#!/bin/sh
$HOME/.xsession-errors
Make the file executable. It will be run automatically when you log out.
Sound like what I am looking for. Is that documented somewhere? Thanks Mario
Mario Streiber writes:
Maybe I should remove (or rename) it everytime I log out. Does anyone know a good place for such a command which is invoked automatically at logout?
Yes. If you're running KDE, create a directory ~/.kde/shutdown and then put a shell script in there, let's call it "kdeshut". In the script add the lines:
#!/bin/sh
$HOME/.xsession-errors
Make the file executable. It will be run automatically when you log out.
Sound like what I am looking for. Is that documented somewhere?
Hehe, it's documented in the source :) Look in the /opt/kde3/bin/startkde script, near the bottom. -Ti -- Ti Kan http://www.amb.org/ti Vorsprung durch Technik
Maybe I should remove (or rename) it everytime I log out. Does anyone know a good place for such a command which is invoked automatically at logout?
Yes. If you're running KDE, create a directory ~/.kde/shutdown and then put a shell script in there, let's call it "kdeshut". In the script add the lines:
#!/bin/sh
$HOME/.xsession-errors
Make the file executable. It will be run automatically when you log out.
Sound like what I am looking for. Is that documented somewhere?
Hehe, it's documented in the source :) Look in the /opt/kde3/bin/startkde script, near the bottom.
:-) anyway, it works fine. Thanks Mario
participants (2)
-
Mario Streiber
-
ti@amb.org