You are not logged in.

#1 2011-09-18 04:07:41

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Setting a GTK3 theme without Gnome-Shell?

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

#2 2011-09-18 04:15:23

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Setting a GTK3 theme without Gnome-Shell?

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

#3 2011-09-18 04:20:43

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: Setting a GTK3 theme without Gnome-Shell?

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

#4 2011-09-18 05:35:19

zyxon
Member
From: Hungary
Registered: 2010-08-31
Posts: 36
Website

Re: Setting a GTK3 theme without Gnome-Shell?

Well, using either lxappearance or gtk-chtheme should do the trick. I can set GTK3 themes this way (Zukitwo) in Openbox.

Offline

#5 2011-09-18 06:14:39

sunnieside-up
Member
Registered: 2011-08-10
Posts: 58

Re: Setting a GTK3 theme without Gnome-Shell?

Offline

#6 2011-09-18 15:57:23

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

lolilolicon wrote:

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

#7 2011-09-18 16:34:49

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Setting a GTK3 theme without Gnome-Shell?

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>&1

Then grep "elementary", "Adwaita" etc. from the log, see if there's any clue.


This silver ladybug at line 28...

Offline

#8 2011-09-18 19:49:18

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

(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

#9 2011-09-18 20:09:43

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Setting a GTK3 theme without Gnome-Shell?

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.ini

If 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

#10 2011-09-18 20:31:39

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

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

#11 2011-09-18 20:39:07

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

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

#12 2011-09-19 02:47:24

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Setting a GTK3 theme without Gnome-Shell?

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

#13 2011-09-19 07:28:22

Padfoot
Member
Registered: 2010-09-03
Posts: 382

Re: Setting a GTK3 theme without Gnome-Shell?

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-editor

You 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

#14 2011-09-19 09:19:04

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: Setting a GTK3 theme without Gnome-Shell?

The easiest way:

# pacman -S gtk-theme-switch2

Dependencies: gtk2 - works for gtk2 and gtk3 themes.

Offline

#15 2011-09-19 20:32:07

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

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

#16 2011-09-22 22:24:45

evilgnome
Member
Registered: 2009-02-20
Posts: 62

Re: Setting a GTK3 theme without Gnome-Shell?

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

#17 2011-10-04 14:53:03

FlyingIsFun1217
Member
Registered: 2009-09-28
Posts: 26

Re: Setting a GTK3 theme without Gnome-Shell?

If it helps at all, installing the 3.2 update fixed my issue.

FlyingIsFun1217

Offline

Board footer

Powered by FluxBB