You are not logged in.
Hello,
I'm wondering if there's a way to change the system gtk3 theme without having gnome-shell? I read on the wiki about either using gnome-tweak-tool (which depends on gnome-shell to operate) or the ~/.config/gtk-3.0/settings.ini file (which takes effect after gnome-shell is restarted), but I really don't want to install gnome-shell (I'm running xfce).
Simply put, is there any way at all to be able to set the gtk3 theme without having to download gnome-shell and all of it's dependencies?
Thanks!
FlyingIsFun1217
Offline
After editting ${XDG_CONFIG_HOME}/gtk-3.0/settings.ini, (re)start any GTK3 application and it will apply the new theme. Nothing to do with gnome-shell at all.
This silver ladybug at line 28...
Offline
Does xfce require gtk3 or some other application that you need? You could just use gtk2 if not?
edit: or do what lolilolicon said
Last edited by stlarch (2011-09-18 04:22:00)
Offline
Well, using either lxappearance or gtk-chtheme should do the trick. I can set GTK3 themes this way (Zukitwo) in Openbox.
Offline
This should help:
Offline
After editting ${XDG_CONFIG_HOME}/gtk-3.0/settings.ini, (re)start any GTK3 application and it will apply the new theme. Nothing to do with gnome-shell at all.
Maybe I'm doing something wrong then, because regardless of what I do to the settings file, I receive this error every time I attempt to run a GTK3 program:
Gtk-WARNING **: Could not load named theme "elementary": Error parsing stylesheet
Funny thing is, I get this error even when I change the theme in the settings.ini file:
[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
This is what was making me think I was missing a step.
Thanks again,
FlyingIsFun1217
Offline
Adwaita works for me (after install gnome-themes-standard of course).
Where could you have defined the theme "elementary"? Try:
strace gtk3-demo > /tmp/gtk3.log 2>&1Then grep "elementary", "Adwaita" etc. from the log, see if there's any clue.
This silver ladybug at line 28...
Offline
(gtk3-demo:4877): Gtk-WARNING **: Could not load named theme "elementary": Error parsing stylesheet
access("/usr/share/themes/elementary/gtk-3.0/settings.ini", F_OK) = 0
open("/usr/share/themes/elementary/gtk-3.0/settings.ini", O_RDONLY|O_LARGEFILE) = 6
And for Adwaita:
open("/home/username/.icons/Adwaita/cursors/bottom_right_corner", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/Adwaita/cursors/bottom_right_corner", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=15776, ...}) = 0
open("/home/username/.icons/Adwaita/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/username/.icons/Adwaita/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/Adwaita/cursors/sb_h_double_arrow", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=15776, ...}) = 0
open("/home/username/.icons/Adwaita/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/username/.icons/Adwaita/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/icons/Adwaita/cursors/xterm", O_RDONLY) = 6
Maybe you can see something in that that I cannot.
FlyingIsFun1217
Offline
No idea why it looks for the elementary theme, though you may be able to find some clue reading the text around those lines...
Anyway, the error message says this elementary is broken. So where does it come from? If it's installed from a package, check:
pacman -Qo /usr/share/themes/elementary/gtk-3.0/settings.iniIf so, I would check `pacman -Ql <pkgname>`, or/and uninstall the package.
If it's not from a package, it might be messier...
This silver ladybug at line 28...
Offline
Yeah, no matter what, it always searches for the elementary theme. That's one of the things I didn't quite understand.
Elementary, at least the version I have installed, came from AUR. I'll try uninstalling and reinstalling and see if that does anything in my favor.
FlyingIsFun1217
Offline
Uninstalled and reinstalled the egtk-bzr package, and I'm still getting the same error when opening GTK3 apps:
[WARN 16:38:07.009262] [Gtk] Could not load named theme "elementary": Error parsing stylesheet
FlyingIsFun1217
Offline
All I know is GTK3 applications read $XDG_CONFIG_HOME/gtk-3.0/settings.ini || /etc/gtk-3.0/settings.ini for theme settings.
So check both files -- filename, content and permissions.
Another thing you might want to check is if there is a symlink "default" under ~/.themes/, or similar under /usr/share/themes/.
Yet another thing could be messed up environment variables like $HOME, $XDG_CONFIG_HOME etc.
The output of the strace should be helpful, otherwise, no idea.
Last edited by lolilolicon (2011-09-19 05:31:35)
This silver ladybug at line 28...
Offline
Not knowing which app you are using, It can be a little hard to tell, but I'm guessing you might have dconf installed.
If so, try launching:
$ dconf-editorYou will find the gtk3 theme settings in the gnome-shell keys.
The entire time I had gnome 3 installed (just testing it to see what it was like - back on Xfce now) I never had to touch $XDG_CONFIG_HOME/gtk-3.0/settings.ini. In fact, the file never even existed on my system.
I configured all my theme settings (gtk3 - dconf, gtk2 - gconf) in dconf-editor.
Even now, in Xfce, I have gtk3 apps installed without dconf and without $XDG_CONFIG_HOME/gtk-3.0/settings.ini. They just pick up the gtk3 theme settings from my selected theme's directory.
Cheers.
Last edited by Padfoot (2011-09-19 07:35:14)
Offline
The easiest way:
# pacman -S gtk-theme-switch2Dependencies: gtk2 - works for gtk2 and gtk3 themes.
Offline
In both gtk-theme-switch2 and dconf-editor, the default theme is listed as Adwaita, as I had previously set it. When changed to 'elementary', the loading problem still exists.
And to answer the question as to what app displays this behavior, every GTK3 app.
I'm sensing a GTK3 bug, but I'm not sure how to proceed with it. Help is appreciated still!
Thanks
FlyingIsFun1217
Offline
I just want to add that I have tried all methods listed here, and still cannot successfully change the gtk3 theme. At the very least I'd like the get the font to a reasonable size.
A large screenshot of 2 gtk2 apps and 2 gtk3 apps: http://i.imgur.com/npLAn.png
If there is a way to temporarily install and run gnome-shell just to set the gtk3 theme, then uninstall it, I will do it. Would that work?
Offline
If it helps at all, installing the 3.2 update fixed my issue.
FlyingIsFun1217
Offline