Unfortunately. This symlink cause issues with GTK themes in snap apps. They are not modified as it should. First issue from what I see, apparmor blocking access to this file.
Iām using my build of COSMIC desktop environment from my ppa: hepp3n/cosmic-epoch
There is settings daemon which modifies those specified in this template files when editing theme in COSMIC settings app. There is created symlink each time we modify theme.
It might be enough to make an apparmor profile for reading this file, so apps can access this path and it should solve the issue? There is path for ~/.config/gtk-3.0/gtk.css in apparmor but itās not including symlinks I believe.
Iām not sure how to deal with apparmor tho. Do I need to create for each app a profile with allowing this paths?
I know when unlink this file and copy from final path to ~/.config/gtk-3.0/gtk.css makes theme works perfectly for snap apps. So itās must be permission issue for sure.
Not exactly. First a theme snap of the theme must exist on snapcraft.io, and then it must be installed. Snaps canāt access system themes except via the gnome snap which can handle most, if not all, theme snaps. It will know what theme to use, but if it doesnāt find it, it defaults to adwaita.
Ah right. So itās adw-gtk3 theme. When I toggle support for GTK apps in COSMIC settings. Itās just writes to gsettings adw-gtk3 as a theme and modifying gtk.css then.
I notice also. Snapd prompts for installing missing themes when this toggle is enabled
I had this working somehow, before. Please look this post
Not sure to be honest, how I got this working tho
I tried to refresh few snaps, it might be snapd-desktop-integration + snapd itself. But itās not working this time. Or something changed to adw-gtk3 or something else.
For that part of it I would ask on forum.snapcraft.io as general snap development/debugging is supported there. Snap is straight from Canonical as one of their products. While Ubuntu is also a Canonical product, itās also a community project. Thatās the focus here in this discourse as opposed to the snap forum.
I donāt know if the snap confinement could be an issue here, as well. There is an interface called personal-files for access to the ādotā directories/files (~/.*). Since your symlink points to ~/.config/... the snap(s) in question need to be connected to it.
snap connect <plug>
<plug> has the format <snap>:<slot-name>, e.g. firefox:dot-mozilla-firefox. <slot-name> is a name for the interface connection of a snap, and itās different for every snap. Iāve tried to snap connect firefox:personal-files, which didnāt work:
error: snap "firefox" has no plug named "personal-files"
Disclaimer: Donāt nail me on the snap terminology.