HeadlinesBriefing favicon HeadlinesBriefing.com

Fixing Thunderbird's stray home directory with fish and systemd

Hacker News •
×

A recent XDG update introduced a new “projects” directory type, triggering a bug in Thunderbird that creates an empty ~/thunderbird folder on every launch. The client still stores profiles in the legacy ~/.thunderbird path instead of the expected ~/.config and ~/.local/share locations. Users see a redundant, lowercase directory they cannot easily delete, cluttering their home space.

The author proposes a lightweight fix using the fish shell to monitor the home directory with inotifywait and immediately remove the stray folder. A short script saved as ~/.local/bin/watch-thunderbird-dir.fish runs continuously, and a user‑level systemd service launches it at login, ensuring the directory never persists without requiring root privileges.

Enabling the service requires making the script executable, reloading the user daemon, and starting the unit with systemctl –user. The workaround stays in place until the upstream bug is patched, preventing clutter in developers’ home directories. It demonstrates how a few shell and systemd tricks can mitigate packaging regressions without source changes.

To avoid lingering side effects, users should disable the service after the bug is fixed upstream. The pattern of watching for unwanted directories and cleaning them automatically can be repurposed for other misbehaving applications. This pragmatic fix restores a tidy home environment with minimal maintenance.