How to change GTK theme

Hi, does anyone know how I can change the GTK2/GTK3-Theme/engine? In Linux Mint, there is an option under themes. In EndeavourOS, if I change the theme for the applications and specifically use a downloaded gtk-theme, I still occasionally get the adwaita standard theme, which is okay, but since I have everything in dark, this looks a bit weird. This happens, for example, in many gnome apps. Any ideas?

Welcome to the forum!

Are you sure those aren’t gnome apps which have switched to libadwaita?

If so, those applications don’t honor gtk3 themes.

1 Like

As @dalto said, the newer gnome apps are not very themeable. And Linux Mint might be using the older pre-libadwaita versions of these apps. But at least some of them can be made to use dark theme by entering the following from the terminal:
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

If you want to revert the setting back to the default value:
gsettings set org.gnome.desktop.interface color-scheme 'default'

1 Like

GTK 2/3 applications will take the theme set using the desktop environment’s GUI tools e.g. Preferences > Themes in Cinnamon.

Unfortunately, this no longer works in full, as the previous contributors note, because the GTK library has several versions and there have been recent undesirable changes.

GTK 4 applications (of which there are more and more) are tricky because the theming has to be done individually (although, as the previous post notes, it is possible to set a global dark or light theme … but that is GNOME’s own theme, not related to any custom theme, and generally looks wrong in context).

I am doing this from Cinnamon.

  1. Download and install the theme into ~/.themes. It must have a “v40” variant. For example, my ~/.themes looks like:

Nordic-darker Nordic-darker-v40

  1. Run the application to be themed from the command line as:

GTK_THEME=<theme name> <application name>

For example:

GTK_THEME=Nordic-darker-v40 gnome-firmware

And the GTK 4 application is themed:

The application’s desktop shortcut could be modified to always run the command above.

The way to find out which applications use GTK 4 is simply to install a GTK 2/3 theme and find those which don’t match the theme.

This is all very awkward. Unfortunately, GNOME has taken decisively against theming (alternative lengthy technical post) although it has, I think reluctantly, shrunk from preventing GTK 4 applications being themed at all.

gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

This solved it! MANY THANKS!!!

I would just add that for some applications (like gnome-calculator or gnome-disk-utility you can find a GTK3 version in the AUR. As always - if people are annoyed with something, they will fix it in AUR :slight_smile:

is thankfully still free of libadwaita dependency and works fine with gtk3 themes.

There are indeed gtk3 alternatives in the AUR, and other options too :sweat_smile: I am using mate-calc instead.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.