1

I use Debian unstable. After updating the system, Thunderbird suddenly cannot open attachments any more -- nothing happens at all, but the file is stored in /tmp/mozilla.... Usually, evince (or firefox-bin, aka Firefox quantum) would open normally on my computer.

Opening Thunderbird through the command line, following error messages are printed:

(thunderbird:25364): Gtk-WARNING **: Attempting to read the recently used resources file at '/home/jenserat/.local/share/recently-used.xbel', but the parser failed: Datei »/home/jenserat/.local/share/recently-used.xbel« konnte nicht geöffnet werden: Keine Berechtigung.

(thunderbird:25364): GVFS-WARNING **: can't init metadata tree /home/jenserat/.local/share/gvfs-metadata/root: open: Keine Berechtigung

(thunderbird:25364): GVFS-WARNING **: can't init metadata tree /home/jenserat/.local/share/gvfs-metadata/root: open: Keine Berechtigung

(thunderbird:25364): Gtk-WARNING **: Attempting to read the recently used resources file at '/home/jenserat/.local/share/recently-used.xbel', but the parser failed: Datei »/home/jenserat/.local/share/recently-used.xbel« konnte nicht geöffnet werden: Keine Berechtigung.

("Keine Berechtigung" is German for "Permission denied")

2 Answers 2

1

The issue is triggered by a mix of a recent Debian kernel now supporting App Armor, and the App Armor rules shipped with the system being to strict and denying evince to access the recently used files (which are updated when opening an attachment with evince). The issue is also described in Debian bug report #882782 and might as well affect other Linux distributions.

The solution is to install the App Armor tools package (sudo apt install apparmor-utils and then adjusting the App Armor profile using sudo aa-logprof). The tool will show following observations (likely it will print more results which will indicate other issues, in my case it was the first):

$ sudo aa-logprof
Reading log entries from /var/log/audit/audit.log.
Updating AppArmor profiles in /etc/apparmor.d.

Profile:  thunderbird
Execute:  /usr/bin/evince
Severity: unknown

(I)nherit / (C)hild / (P)rofile / (N)amed / (U)nconfined / (X) ix On / (D)eny / Abo(r)t / (F)inish

The output means that while the thunderbird profile was active, /usr/bin/evince was to be executed but failed.

You can now decide whether to:

  • (I)nherit Thunderbird's profile (which means Thunderbird's restrictions will also apply to evince, which will not be matching properly), or

  • (C)hild will apply evince's profile instead (if available) <-- that's what we're looking for.

    ...

  • Finally, select (F)inish to finish editing.

If you use another tool to read logs, the prompt might read slightly different.

Future Thunderbird updates should bring better App Armor profiles, but this is a proper workaround for the moment (and should not do harm in future after better profiles are installed).


It's worth noting that the man page for aa-logprof only mentions this menu:

(A)llow, (D)eny, (I)gnore, (N)ew, (G)lob last piece, (Q)uit

but it doesn't seem to apply to this situation. Perhaps the man page will be updated at some point to better explain this.

1
0

For Ubuntu, the cause may be that you have snapd version of Thunderbird or other application opening attachment.

In that case, according to that thread:

/tmp isn’t “the global and universally accessible location” any more

As a solution, you must override the TMP environment variable for Thunderbird process.  Make a file called, for example, ~/bin/thunderbird:

#!/usr/bin/env bash
TMP=$HOME/Downloads /usr/bin/thunderbird "$@"

make it executable:

chmod +x ~/bin/thunderbird

Now you should be able to double-click attachments and open them with other snapd apps like Chromium or OpenOffice.

1
  • (1) If you didn’t mean “snapd”, please edit your answer to clarify what you are talking about. I can’t find anything called “snaped”. (2) The sentence that you quote isn’t in the document you linked to. Can you provide a valid reference? (3) Please learn the difference between $* and $@, and don’t use $* except in the very few cases where it’s appropriate. Feb 8, 2022 at 0:37

You must log in to answer this question.

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