Sample Header Ad - 728x90

How to launch an application with different Gtk+ 2 theme?

3 votes
0 answers
1920 views
I'm trying to use a dark Gtk+ theme, and everything goes fine with native Gtk+ apps, and well, only with Gtk+ apps. I mean, wxWidgets and Mozilla's apps looks terrible, if not counting unreadability (see screenshot below). Rendering Gtk's buttons and fonts in Qt apps looks bad too. Audacity, Icedove and Iceweasel using Gtk+ 2 dark theme I've learned Mozilla's apps could improve readability (text on light background become readable **but** text on dark background becomes hard to read) by adding this to gtk-2.0/gtkrc: style "moz" { text[NORMAL] = "#000000" base[NORMAL] = "#FFFFFF" } class "GtkInvisible" style "moz" apwidget "GtkInvisible" style "moz" So I came out with this solution: start these apps with a 'fallback' light Gtk+ 2 theme (let's say Adwaita). But launching with something like GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc could change gtk's PNGs (like buttons and checkboxes), **not** the color scheme: Audacity launched with Adwaita theme I noted that doing this, it returns some warnings, e.g.: $ GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc audacity (Audacity:12322): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init() $ GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc icedove (process:13204): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed With Qt(4) apps, I tried to use a native good-looking theme like Breeze, but couldn't find a way to choose it after installing (I had no luck using qtconfig-qt4). Here are some of my software versions (I'm using Debian testing): - Gtk+ 2: 2.24.28 - Gtk+ 3: 3.16.6 - Qt4: 4.8.7 - wxWidgets: 3.0.2 (Audacity's version is 2.0.6) - Iceweasel (Firefox): 38.1.0 - Icedove (Thunderbird): 31.7.0 Does anyone know how to solve this problem? I would be really glad to see any answer, even if it's specific to only one application.
Asked by McSinyx (591 rep)
Jul 30, 2015, 10:34 AM
Last activity: Jan 25, 2017, 12:13 PM