I've discovered something about snap theming

On Ubuntu 18.10 Cosmic Beta live, snap packaged applications like gnome-calculator, system monitor… recognized Yaru and used it perfectly but after installation and reboot the machine I tried same apps again but they weren’t using Yaru (were using Ambiance). So I tried something, well, I uninstalled and then reinstalled gnome applications and started them again… Voila! They were on Yaru again. I rebooted the machine then tried them again and they were still using Yaru nothing broke. They just using DMZ-white cursor. Other than that this steps could be done in the installation process. After everything done, Ubiquity could do that reinstalling snap packages and technically it should work. Sorry for broken English.

Same problem for me…

1 Like

Did you try to reinstall gnome-calculator? If not, could you please do that and let us see if it works for everyone?

1 Like

Cross-posted to the snapcraft forum

Re-installing the snap doesn’t change something for me…

Are you using Yaru? Because gtk-common-themes snap only include most common stuff.

Can you paste the output of “snap interfaces” when it’s broken please?

There is nothing “broke”, apps were using Yaru and nothing was broke. Sorry that I’ve forgotten to add an “and” or a comma :stuck_out_tongue:

I’ve discovered it wrong :man_shrugging: It uses the Yaru theme when you switch the theme to another one then re-switch to Yaru from Gnome Tweaks. It is probably something like a wrong configuration entry in the dconf that needs to be updated after installation. @willcooke @huluti @ads20000

Are you using the Wayland session, by any chance? If so, then it sounds likely that you’re running into GNOME/gtk#1343.

Under Wayland, GTK selects its theme based on a configuration value stored in gsettings/dconf. If you haven’t ever changed a configuration value, then it won’t be present in your user dconf database and the default value will be taken from the gsettings schema. The problem occurs because snap confined apps see a different set of gsettings schemas, so some configuration values may look different.

So while on Cosmic the default value for gtk-theme might be Yaru, a confined application using libraries/data from Xenial might instead see Ambiance.

When you used the tweak tool to switch back and forward between themes, you’d likely no longer be relying on the schema default value for your theme. In turn you’d now see Yaru for those confined applications.

None of this applies if you are using the default X11 session though (or have X11 apps running throught Xwayland on the Wayland session). In that case, the theme name is communicated via the XSETTINGS protocol and should be consistent for confined and unconfined applications.

We don’t yet have a good solution for the bug I referenced. As a workaround, it might make sense to update the gnome-platform snap to set Yaru as the default theme in its schemas: this would make no difference to X11 sessions, and people using Wayland are more likely to be on the latest release rather than aiming for LTS stability.


Yeah I am using Wayland. Didn’t know thanks.

1 Like

Okay, so a fix for this would be to update the gsettings schema defaults in the gnome-platform snap to use Yaru by default. This should give the following behaviour for these configurations:

X11 Wayland
Xenial Ambiance N/A
Bionic Ambiance Yaru
Cosmic Yaru Yaru

That moves the configuration with the wrong theme from cosmic/wayland to bionic/wayland, but that is probably better over all (especially when you add all the post-Cosmic releases to the table).


Still happening. Any plans to solve it?

This problem is still present in Ubuntu 21.04. In the Wayland session the theme for the Snap apps is the Adwaita theme. When logging into Xorg the theme of the snap apps is Yaru. Anyone have any idea how to fix this?