Override theme background color for certain applications

When using a custom theme (Equinox Evolution Midnight in my particular case) the manager at System > Preferences > Appearance > Theme > Customize > Colors is indeed reflecting the actual system-wide styling, but, turns out certain applications (LibreOffice, Bluefish Editor and many others) are actually overriding that theming as they display a white background. So I was wondering if there's a sort of centralized way to manage such exceptions (as in fact I'd like to have all my text editors overriding the dark background) or I should set that up in a per-application fashion?

Any guidance will be sincerely appreciated, thanks much in advance.


Firstly, the GTKParasite application does not handle themes at all. It might be useful to detect if the misbehaving application is a GTK application at all and determine the class of the editor widget. In Windows-speak, it is the Spy++ of GTK.

Changing the editor color affects the lot of applications that directly use the GtkText widget (and to some extent the GtkSourceView widget at the root of syntax coloring editors like gedit and geany).

Applications like Firefox and *Office are not real GTK applications, they have their own cross-platform widget set that render GTK decorations but do not have the association to the real text editor class.

Bluefish is a real GTK app but seems to implement its own text editor widget since it does not look like GtkSourceView or SciTe at all. You will probably find a lot of applications that jump to the conclusion that all text background should be white, and changing them globally won't be possible without some per-application-tweaking.


You can add the theme options to your ~/.gtkrc. I'm not 100% sure how gtk theming works (off hand), but it should be relatively easy to add the options you need to apply by copying them from the gtkrc file of another theme or the theme you are using currently.

This page also contains some information on GTK+ theming (not for GTK+ 3.x).


If you'd like LibreOffice to display your current theme, all you need to do is install libreoffice-gtk

sudo apt-get install libreoffice-gtk 

That should easily take care of that.

Bluefish is a bit trickier. The creators of themes can tailor Bluefish the way they wish, but it requires unique customization. So, you might contact the author of the theme you enjoy to let him or her know what programs aren't displaying the theme accurately. I'm sure they'd love to know about it. Or, you could customize it if you'd like, the instructions are here. Or, I guess you could use another editor that incorporates the default GTK theme. In any case, contacting the the author of your theme is probably the best route.

Regarding your question about centralized control over theming, it seems one solution is something called GTKParasite, which I found via stackoverflow. On its About page it claims to be the Firebug of GTK+ applications. I've not personally tried it yet, but that description sounds a bit intriguing. And, possibly, much like what you are looking for. Seems worth checking out.