Snapd-desktop-integration permissions for gtk-{3,4}.0 apparmor

I’m using my own build of COSMIC desktop on Ubuntu. Works fine, but theming not really.

Snap apps does not use properly modified themes because of apparmor denied.

The message looks like this:

Jul 02 20:00:10 dream-machines kernel: audit: type=1400 audit(1783015210.757:487): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/heppen/.config/gtk-4.0/cosmic/dark.css" pid=131953 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

The COSMIC desktop modifying in ~/.config/gtk-{3,4}.0/cosmic/* CSS for theming adw-gtk3.

I remember I had this working while ago, not sure how, tho :frowning:

Anyone have an idea how to deal with it? Probably I need to write custom apparmor profile but how to this globally? Every app has denied for this path unfortunately.

Hey

This looks like a small limitation in the interface in snapd. I’ve made a patch and sent it for review interfaces/builtin: allow gtk css in subdirectories by zyga · Pull Request #17355 · canonical/snapd · GitHub

1 Like