this works for me
rm ~/.xsession-errors
touch ~/.xsession-errors
sudo chattr +i ~/.xsession-errors
http://ubuntuforums.org/showthread.php?t=1946716
Printable View
this works for me
rm ~/.xsession-errors
touch ~/.xsession-errors
sudo chattr +i ~/.xsession-errors
http://ubuntuforums.org/showthread.php?t=1946716
Do not rm ~/.xsession-errors!
The processes that have it open will hang on to it, and keep writing, and eating up your disk space.
Linking to /dev/null seems to help for a while, but then something seems to recreate the damn file!
I tried many different ways, and here is what worked:
sudo echo "*/1 * * * * $USER echo>$HOME/.xsession-errors" > /etc/cron.d/truncate-stupid-xerr
The stupid thing was eating like a GIGABYTE per minute. Now it is under control.
I'm Using Xubuntu 12.04/ Xfce 4.8 and am wondering what did I do wrong? I tried what you said here:
I then deleted the .xsession-errors file by right clicking & clicking delete. I then rebooted. After it booted, I opened Thunar & a new one was generated.Code:# initialize variables for use by all session scripts
OPTIONFILE=/etc/X11/Xsession.options
SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources
SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=/dev/null
Did I type it wrong? ;)
Whoops, didn't see the post just above me when I replied. Still would like to know why it doesn't seem to work for me though. ;)
Hm. You didn't forget the "sudo" in the beginning of the command, did you?
$USER is a shell variable, that is automatically set to your username. You don't need to replace it with anything, just make sure you don't miss the dollar sign. Same goes for $HOME (that would be your home directory).
Nope, I highlighted the whole line and opened the Xfce terminal & pasted it. Then when I hit enter got the above text.
this was very good info .. i found this hidden file in my home directory and was shocked at the size .. i delegated 100GB to my linux partition and somehow 82GB was taken by ~/. and the xsession-errors was 80GB of that .. whew ! what a relief .. there was no way i was occupying 99% of the drive as there are NO media files (photos, videos, music, etc) at all on the linux partition
.
will the chattr command work if I already rm'd the file and created a new blank one? I also redirected the error output to /dev/null yet I'm still getting a full hard drive, and lsof returns this:
Even when the hard drive is full the .xsession-errors file has no size...so it seems to be creating this file irregardless of the current empty .xsessions-file. This problem is really annoying because it stops all server processes that have to write to a log file (apache, mumble, VNC...etc etc).Code:bob@Newton:~$ lsof |grep -i deleted
gnome-ses 2686 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
gnome-set 2736 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
gsd-print 2753 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
metacity 2755 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
gnome-pan 2771 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
nm-applet 2779 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
bluetooth 2780 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
polkit-gn 2781 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
nautilus 2782 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
vino-serv 2786 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
gnome-fal 2793 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
dropbox 2809 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
dropbox 2809 bob 3u REG 8,49 0 270905 /tmp/tmpfP0B-G (deleted)
gdu-notif 3028 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
telepathy 3031 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
gnome-scr 3039 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
zeitgeist 3040 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)
update-no 3098 bob 2w REG 8,49 19870789632 1841695 /home/bob/.xsession-errors (deleted)