1

I have my ~/ directory that is being flooded by ".Xauthority.43652W" files with "43652W" being any combination of letter and digits...

I only have 40 of these files for the moment, but it's ever growing and I don't want to pollute my ~/ too much.

Any idea what should I do ?

3
  • Remove them? Just leave the base .XAuthority file.
    – Thomas Ward
    Sep 19, 2013 at 5:43
  • :-) Nice suggestion... I would have prefer a configuration parameter that would have help me stop producing them :-) Sep 19, 2013 at 5:53
  • I have just 5 since installing 13.04 in April. Before that, something similar was happening with .goutput (?)
    – user25656
    Sep 19, 2013 at 6:01

1 Answer 1

3

For those -- like me -- wishing to get rid of this "pollution" in the user directory (apparently caused by a lightdm bug described in Why do I have so many .Xauthority.* files in my home directory?), an interim solution could be placing something like the following (executable) script file (which assumes you are the first user after root) into the /etc/cron.daily directory:

#!/bin/bash
USER="$(users | awk -F ' ' '{print $2}')"
ls /home/"$USER"/.Xauthority.* > /home/"$USER"/.Xauthority-Files.txt
NFILES="$(grep -c Xauthority /home/"$USER"/.Xauthority-Files.txt)"
LOG="/home/"$USER"/.Xauthority-Files.log"
echo -e "$(date +"%x %R"): "$NFILES" .Xauthority.* files deleted" >> "$LOG"
rm -f /home/"$USER"/.Xauthority.*
rm -f /home/"$USER"/.Xauthority-Files.txt
exit 0

NOTE: This updated script keeps a log file named ".Xauthority-Files.log" so that you can follow up if a recent update has put an end to this bug, and then remove the script when it's no longer needed.

0

Not the answer you're looking for? Browse other questions tagged .