Does anyone know what the thunderbird.tmp folder created by Thunderbird in ~/Download is used for?
You can find copies of emails encrypted with GPG, nscopy.tmp, nsemail.eml, data.sig & key.asc files
It is not a temporary directory since the files are not deleted nor after closing Thunderbird or even after a restart.
~/Download is such an unusual place for this kind of file.
This is a tmp dir to store files you choose to open directly from Thunderbird. The snap can’t use the usual (insecure) /tmp location so had to choose something widely available so other apps can open the files if chosen.
Nothing here but GPG encrypted mails, .asc and .key files in this thunderbird.tmp dir.
None of these files have been opened by myself
It was only encrypted mails that were sent
Maybe this is the way to deal with encrypted emails following enigmail shutdown
It reminds me of this:
This thunderbird.tmp folder does not clean itself, weird for a temporary folder
there is … $XDG_RUNTIME_DIR always points to /run/user/$UID/snap.<snapname>/ … perhaps TMPDIR could be set to point to XDG_RUNTIME_DIR in the environmnt block in snapcraft.yaml …
but that indeed only works if thunderbird actually respects $TMPDIR
@kenvandine could you take a look if above idea can be implemented in thunderbird snap? If yes then same thing should be done for ff snap too (plus others facing similar issue).
Can that choice be configurable? My ~/Downloads is a mounted directory, so thunderbird is unusable as snap, due to apparmor policies. I can’t send or save mails.
My home directory has been my “Downloads” directory for the last two decades. So now I have a stupid “thunderbird.tmp” folder (besides the stupid, hard-coded “snap” directory itself).
Do you really want tell me that the snap architecture has no clean or at least somehow configurable strategy for dealing with a few directory paths and for temporary files?
Good news! The file which configures this is a script called bin/tmpdir in the Thunderbird snap package. A couple of lines could probably make this configurable. As someone with a couple of decades experience in desktop Linux, and clearly with motivation to fix this, perhaps you could offer a patch to that script, which makes this configurable via an environment variable, or snap set command or similar.
Thank you for your reply. I did some internet search and found that many other snaps are also affected by this “design”, most notably Firefox.
There they also had endless debates about $DOWNLOAD/firefox.tmp. It took nearly a year that they finally fixed it somehow and removed exactly the same line as in Thunderbird’s bin/tmpdir:
So I won’t go into this one and I won’t start yet another fruitless discussion about the fundamental difference between a temporary directory and a download directory. And I definitely don’t want to pollute my home directory or any sub-directory (and it’s backups!) with piles of temporary files left behind by some sloppy designed snaps.
Additionally this snap migration also missed to properly move my Thunderbird profile directory correctly, which also took me some time to research and fix. That’s too much for me, so I will simply avoid snap in the future.
Are there any updates for this issue? Using the user’s Download folder for temp storage goes against everything Linux is about.
NOTE: As a workaround. Many distros allow you to create a .hidden file which will no display any folders/files you list in it. For now, just create .hidden in the Downloads folder containing thunderbird.tmp