'thunderbird.tmp' folder in '~/Download' directory?

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.

Thunderbird 78.4.0
snap 2.47.1+20.10.1
snapd 2.47.1+20.10.1
series 16
ubuntu 20.10
kernel 5.8.0-26-generic

1 Like

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.

1 Like

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

I wish there could be some tmpfs path for storing those temp cruft i.e. under /run/user/$UID.

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

[ out of topic, I guess but ] same kind of workaround regarding /tmp should be done in other snap ( gimp for example as some plugins may need /tmp ).

I agree ~/Download is unexpected place.
Why not using using something like ~/snap/app/common/tmp ?

Thx, that should work assuming xdg-portals work in snap now.

Currently it’s done through wrapper script, see https://bazaar.launchpad.net/~ubuntu-desktop/thunderbird/snap/view/head:/tmpdir#L4

Yes it does as shown above.

@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).

Maybe another path https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1903893/comments/9 ?

/run/user/uid/…/…

This is /run/user/$UID/snap.<snapname>/ we talked above.

1 Like

My bad, indeed, that’s exactly what you talked about above !