#694405 Theme in settings.ini is ignored

Package:
libgtk-3-0
Source:
gtk+3.0
Description:
GTK graphical user interface library
Submitter:
"Adam C. Emerson"
Date:
2013-11-05 16:39:05 UTC
Severity:
normal
#694405#5
Date:
2012-11-26 07:54:54 UTC
From:
To:
Good evening,

GTK3 applications have started ignoring my
~/.config/gtk-3.0/settings.ini file.  I haven't changed the file in
over a year, and the problem started roughly two weeks ago.

The file is:

[Settings]
gtk-theme-name = HighContrastInverse
gtk-fallback-icon-theme = gnome
gtk-font-name = Sans 16

The applications print no warnings about being unable to open the
theme, and I have the gtk-accessibility-themes package installed that
provides the HighContrastInverse theme.  It does seem to be using the
proper font, however.

Thank you.

#694405#10
Date:
2013-01-31 17:15:33 UTC
From:
To:
Do you have gnome-settings-daemon running?
What does
 gsettings get org.gnome.desktop.interface gtk-theme
say?
Which desktop environment is this?

Michael

#694405#15
Date:
2013-11-05 16:37:34 UTC
From:
To:
I can confirm this bug also.

I'm my case I'm running XFCE desktop, and all GTK3 applications look horrible.

I tried to manually force the Adwaita theme on settings.ini but there is no way.

I have this configured:

$ cat ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-fallback-icon-theme = gnome


$ gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita'


But gtk3 application will ignore this settings and will try to load an "Xfce" theme that
is the one I have defined on xfce4-settings-manager.


$ strace gnome-calculator 2>&1 |grep -Pi '(Adwa|themes|settings.ini)'
access("/usr/share/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/xdg/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/home/clopez/.config/gtk-3.0/settings.ini", F_OK) = 0
open("/home/clopez/.config/gtk-3.0/settings.ini", O_RDONLY) = 11
read(11, "[Settings]\ngtk-theme-name = Adwa"..., 4096) = 98
access("/home/clopez/.local/share/themes/Xfce/gtk-3.0/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/home/clopez/.themes/Xfce/gtk-3.0/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Xfce/gtk-3.0/gtk.css", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Xfce/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
read(12, "[Icon Theme]\nInherits=Adwaita\n", 4096) = 30
open("/home/clopez/.icons/Adwaita/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clopez/.icons/Adwaita/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/Adwaita/cursors/xterm", O_RDONLY) = 12




I have also tried to clean my environment of any variable that had an xfce string. It didn't help.



What at the end worked for me was to open xfce4-settings-manager and select Adwaita on the theme list.
This not only effectively changed the theme for the GTK+-3 applications, but for the whole desktop.


So, GTK+-3 is ignoring the gtk-3.0/settings.ini configuration. It only obeys the settings defined by the DE.