Thunderbird littering my home
I’ve recently rediscovered Thunderbird, but it has developed a bug, apparently because of recent XDG changes which added a new type of projects directory. The bug means that any time I start Thunderbird, it creates a directory ~/thunderbird .
The directory is useless. It remains empty, and Thunderbird already uses an old-style ~/.thunderbird for configuration and data, instead of respectively under the standard ~/.config/ and ~/.local/share/ .
I don’t have the time to build the knowledge to fix this bug. I am, however, on record for finding applications that make directories in my home, intended or not, impolite and inconsiderate, so this will not stand.
In the rest of this post I will use the fish(1) shell as well as systemd(1), so if you use different tools, adjust as needed.
~/.local/bin/watch-thunderbird-dir.fish :
#!/usr/bin/fish inotifywait -m -e create ~/. | while read FILE echo $FILE if test -d 'thunderbird'; rmdir 'thunderbird'; end end
The above will watch my home directory. Whenever a directory called “thunderbird“ is created, it is immediately removed. But I don’t want to run it by hand and have an open terminal all the time, so I create a systemd user service:
~/.config/systemd/user/watch-thunderbird-dir.service :
[Unit] Description=Watch and remove thunderbird directory After=network.target [Service] Type=simple ExecStart=/home/me/.local/bin/watch-thunderbird-dir.fish Restart=always RestartSec=2 [Install] WantedBy=default.target
... continue reading