5

I am using Cinnamon on Arch Linux with a dark theme (specifically Vertex Dark). The dark theme leads to undesirable behavior in some apps where the foreground color is hard-coded to a dark color but the background color uses system colors.

One way around this is to create a ~/.local/share/applications/<myapp>.desktop file which sets a different GTK theme. However, Keepass doesn't seem to be respecting the GTK_THEME environment variable. In the shell, if I try:

env GTK_THEME="Vertex" keepass

The Keepass theme doesn't seem to change at all. I suspect that this is because Keepass uses Mono for cross-platform support, which has some rough edges and doesn't always behave like native applications. Is there a different variable that I should be setting for Mono apps?

(Note that there appears to be a similar unanswered question on AskUbuntu).

Edit: Looking into this a bit more, it seems that KeepassXC has really matured since I last looked, so switching to a naive application is a feasible option. However, I'm still interested in learning whether or not there is something that can be done.

Paul
  • 241
  • 1
  • 8

1 Answers1

4

Had the same problem and fixed it by setting the GTK2_RC_FILES variable like this: GTK2_RC_FILES="/usr/share/themes/Adwaita/gtk-2.0/gtkrc" keepass

Dinko
  • 41
  • 3
  • 1
    Although this should be the proper solution, unfortunately this does not work on debian buster with Gnome 3.30. The Internet does not seem to know why that is. – schlimmchen May 16 '19 at 09:27