.xsession-error file

Yesterday i notice a warning message for minimum space on my /home.

I try rebooting and the result was to stick to the boot login screen despite the fact that I entered the code correctly.

I tried timesift to restore my system and it was successful.

Then with a fresh start I tried to find the cause and followed the page :

I guess the solution is

ln -s / dev / null .xsession-errors

or

sudo chattr + i .xsession-errors

Now .xsession-error file has 0 bytes and disk space is stable

MATE 1.24.1
Kernel Linux 5.10.15-1-MANJARO x86_64
Intel® Core™ i3-4150 CPU @ 3.50GHz × 4

You’d serve yourself well if you double and triple check your commands.

ln -s /dev/null .xsession-errors

You do know that restarting your DE or X will replace that soft link, right?

I don’t agree with this particular brute-force solution.

First, why is your .xsession-errors file so big? Have you even looked at it (other than the size)? Sounds like something is very wrong.

If that doesn’t interest you, you might be better off creating a systemd (user) service/timer to occasionally remove/touch the file.

Τhanks for the comments, but I do not see a better or safer solution. Would you like to suggest me something?

creating a systemd (user) service/timer to occasionally remove/touch the file.

What does .xsession-errors contain? There’s the possibility the root cause might also be generating messages and logging them in some fashion to the journal and/or Xorg.

I agree with @merlock.

Οk! Ι made a mistake i followed the tips in the article.
Can someone write me how to undo the wrong choices and how to properly control my problem?
Τhank you.

I don’t think there are many people on this forum with the gift of clairvoyance.

Sheesh…Really? Really?

Oh well…plonk

if you just prevent the file to change by chattr command, I think just removing the .xsession.errors file and restarting the computer will fix it. then you must look at the newly created .xsesion.errors file for repeated error messages which make it bulky.

Thank you for the kind answer. My English are poor and try to find out how to restore the .xsession-errors file to original position.
I delete it but after restart came back with same look.
xsession
Have anyone the kindly write to me with what commands will I restore the file to its original state?
Thanks in advance!

try this:

rm .xsession-errors
touch .xsession-errors

(make sure you are in the right directory)

The rm command deleted the file but in the next boot it appeared again with the link icon.
.xsession-errors.old appears without the link and has 0 bytes.
Anyway i thank you for “no Arch expert” approach to my problem.
Have a nice day !

As far as I know, the symlink to /dev/null must disappear after a restart. Maybe you created a script or a cron task or added a line to a script that runs every startup (maybe to the very script that creates .xsession.errors log) to create this symlink everytime?

I’m not good at that, just curious :slight_smile:

$ >~/.xsession-errors

 rm .xsession-errors

 ln -s /dev/null .xsession-errors

 sudo chattr +i .xsession-errors

Only the above commands i use from the thread

I saw a good solution — using logger to put this where you’d expect logs & do log rotation ­— but it involved editing /etc/X11/Xsession which doesn’t exist on my system. /etc/lightdm/Xsession exists, but it doesn’t refer to the error file at all.

If you use suspend a lot, this file will just keep growing. Mine was 51 GB! You probably can also just delete it, but if it’s in use when your cron job runs that might not work.

Does anyone know where the log file is set?

mine too

exists but i can’t edit it.

never!

mine now are .xsession-errors = 138 kb & .xsession-errors .old 8kb

Thank you anyway ! :beers: