Just replace the directory of the aa-profiles in the command I gave above with -d /var/lib/snapd/apparmor/profiles .
this does not work:
Code:
$ sudo aa-logprof -d /var/lib/snapd/apparmor/profiles -f /var/log/syslog
Reading log entries from /var/log/syslog.
Updating AppArmor profiles in /var/lib/snapd/apparmor/profiles.
ERROR: Include file /var/lib/snapd/apparmor/profiles/tunables/global not found
$
$ sudo aa-complain snap.libreoffice.writer Can't find snap.libreoffice.writer in the system path list. If the name of the application
is correct, please run 'which snap.libreoffice.writer' as a user with correct PATH
environment set up in order to find the fully-qualified path and
use the full path as parameter.
$
$ sudo aa-complain /var/lib/snapd/apparmor/profiles/snap.libreoffice.writer
Profile for /var/lib/snapd/apparmor/profiles/snap.libreoffice.writer not found, skipping
$
According to https://help.gnome.org/users/evoluti...torage.html.en Evolution's disposable data caches (i.e. where evolution is going to temporarily place attachments when you double-click on them to open) = $HOME/.cache/evolution
As far as I can tell there is no setting in Evolution to change this directory, so we are stuck with putting it into a hidden (starts with ".") directory.
The snap for LibreOffice has the "Access files in your home folder" (:home) interface, which is described here https://docs.snapcraft.io/the-home-interface/7838 as "home allows access to non-hidden files in the user’s home ($HOME) directory."
Looking at the /var/lib/snapd/apparmor/profiles/snap.libreoffice.writer file there is nothing to allow access to $HOME/.cache/
I can solve my problem by adding the following to the bottom of /var/lib/snapd/apparmor/profiles/snap.libreoffice.writer:
Code:
# Allow read access to Evolution's disposable data cache directory (i.e. opening attachments)
owner @{HOME}/.cache/evolution/tmp/** r,
and then reloading the apparmor profile:
Code:
$ sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.libreoffice.writer
$
I just didnt want to do this as I was worried about system upgrade over-writing these changes, or not being applied because I have manually edited the file
The only other way I can think of to allow LibreOffice to open attachments is to symlink to a non hidden directory
Code:
$ mv ~/.cache/evolution/tmp/ ~/dot_cache_evolution_tmp
$ ln -s ~/dot_cache_evolution_tmp/ ~/.cache/evolution/tmp
$
The entire problem is that we are trying to pass a temporary file from one snap application to another snap application and there does not seem to be an effective way to do this yet
Bookmarks