How to set dark mode for GTK4 apps when using a GTK2 theme

Since my favourite theme on my ThinkPad T420 is Ambiant-MATE-Dark-Red it pained me to discover that GTK4 apps (like transmission) completely ignore this, rendering a light window (which sticks out like a sore thumb).

However, after executing the following command:

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

... and a reboot (or "logout and login") the GTK4 apps will be rendered in dark mode.

It still looks a bit off, of course, but it is at least a bit more acceptable this way.

NOTE: This does not work for snaps (like App Center)

EDIT:
In some cases you might also need to run something like this:

echo "export GTK_THEME=Ambiant-MATE-Dark-Red:dark" >> ~/.profile

Of course you should replace 'Ambiant-MATE-Dark-Red' with the theme name of your chosen theme.

2 Likes