I noticed that after I gotten up that I have Zero disk space left. Had a bit over 170 GB before going to bed. So what happen to to this? How do I fix this?
Do recall having to deal with a file that kept getting larger and larger unit a poster showed how to write a script to delete it every boot. I long forgotten what that is named.
This article show my how find the largest files and folders in Linux. Just had read and type in the commands in the Terminal. The file is .xsession-errors.old. I actually had this issue long before.
Strange but never had to deal with this file with other Distros I’ve used before. Now I have to write a script to delete this file on boot.
There is the log file ~/.xsession-errors
As the name suggests, errors get logged there.
When you log out and back in, a new X session starts and the file ~/.xsession-errors
gets renamed to: ~/.xsession-errors.old
and a fresh ~/.xsession-errors is created
You don’t need to remove it, no point in doing that as it will be replaced with what was ~/.xsession-errors
each time you log in.
If that file is large, huge even, as you say, then you have problems that you should address.
Start by actually looking into the contents of that file.
… when many errors get logged - it is a log file
a lot of errors → large log file
It is there so you can find out that there was or is a problem -
ignoring it and deleting it is like putting tape over the check engine light and pretend that there is no problem anymore because you can’t see the light
This major Issue should fixed by Distro Developers, not the Users. Geez I used to be able to have Manjaro and other Distros running for days w/o the problem.
I try to run thunar as root and making the file unwritable but VLC wouldn’t run at all.
Once more:
it is a file where errors are logged
You complain and blame it on anyone and anything but you, yet did not to this day take the time to actually look what the errors are.
To fix something, you need to know what the problem is, you know?
PEBCAC
Everyone running xorg has got that file and has got no problems with it’s size.
Quit ignoring and ranting and start looking!?
I’d like to just look to know and tell you where a possible problem is.
But that is something only you can do.
less ~/.xsession-errors
and scroll trough
or watch tail ~/.xsession-errors
to literally watch the file growing in real time
If this yields nothing worth that huge amount of entries, start pursuing what @linux-aarhus said.
There is no point in deleting it - it will be recreated the next time you start an X session (next time you log in).
… every time, it’s totally futile
You achieve the same with:
no need for an editor - you just want to look at what may be there
this:
will get you “live view” on what is added to the file
If it is such a huge file then I’d expect that there is a lot of activity there.
Normally, that file is very small - with a few entries that are not really problematic, my file gets to about 20 - 30 kB
ps
once more:
If your filesystem is BTRFS, you may have a very different and possibly serious problem
that is just manifesting itself in the form of problems with this file.
But I can’t help you with that at all.
# If the .xsession-errors file is not a symbolic link, delete it and create it as such
if [ ! -h $HOME/.xsession-errors ]; then
/bin/rm $HOME/.xsession-errors
ln -s /dev/null $HOME/.xsession-errors
fi
Wrote the above in my .bashrc file and rebooted. Sorry if I was a hardcase about this.
Well - may it work for you!
I’m sceptical that it will
because that file gets renamed to ~/.xsession-errors.old every time a new session starts
or maybe it’s contents get copied - in which case it might work
IDK
If it does work:
symptom solved!
congratulations!
You have now put tape over the check engine light in the dash of your car so that you can’t see it anymore.
the symptom is hidden - like with pain killers
the cause of the problem has not been addressed at all