on 26/03/2007 17:10 Andriy Gapon said the following:
> FreeBSD 6.2-RELEASE-p2 amd64
> I am not using full GNOME desktop, but rather many GNOME and GTK
> applications (i.e. no gnome-session stuff).
> I have the following line in my .gtkrc-2.0:
> include "/usr/local/share/themes/Mist/gtk-2.0/gtkrc"
> Everything works OK except for one minor problem: if I run
> gnome-theme-manager it hangs eating 100% CPU.
> This problem did not exist with gnome 2.16.
> From ktrace output it looks like gnome-theme-manager is looping or is
> recursing reading .gtkrc-2.0 and /usr/local/share/themes/Mist/gtk-2.0/gtkrc.
> General impression is that trying to do include involves something that
> needs .gtkrc-2.0 again.
While trying to debug this problem I discovered some interesting and new
(to me) things.
It seems that now there is such thing as XSETTINGS and apparently
gnome-settings-daemon acts as xsettings manager. GTK2 applications on
startup (in gtk_init and similar) read those xsettings and they actually
override certain settings from gtkrc-s.
So in my case gnome-theme-manager read my .gtkrc-2.0, then explicitly
included /usr/local/share/themes/Mist/gtk-2.0/gtkrc, and then honored
Net/ThemeName="Mist" xsetting and apparently that caused some confusion.
So, now instead of explicit include I use more modern and correct way to
specify a theme via gtkrc:
This has correct effect when xsettings are not available and also
Net/ThemeName overrides this property, so everything is still right when
xsettings are available (i.e. gnome-settings-daemon is running).
Now the hang is fixed for me, so I don't really want to pursue further
what lines of code actually caused it.