You are not logged in.

#1 2011-04-08 02:53:27

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

GTK 3 Settings / [Solution] Ugly GTK3 Theme

For those of us who don't use gnome, gtk3 apps look terrible! In gtk2 we use to put our settings in .gtkrc-2.0 but this changed for gtk3

${XDG_CONFIG_HOME}/gtk-3.0/settings.ini

[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome

See http://developer.gnome.org/gtk/unstable … tings.html for more info.

Figured this would be an issue that would bite a lot of people. Hopefully this will save help some out.

Edit: For anyone that want to see the ugly window: http://ompldr.org/vODYwYg

Last edited by pyther (2011-04-08 03:03:37)


Website - Blog - arch-home
Arch User since March 2005

Offline

#2 2011-04-08 06:35:23

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Thanks pyther. Now if only there were more than 5 themes (none of which are Dark)....


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-04-08 07:50:27

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

ngoonee wrote:

Now if only there were more than 5 themes (none of which are Dark)....

"ngoonee, author of the first dark gtk3 theme!". smile


ᶘ ᵒᴥᵒᶅ

Offline

#4 2011-04-08 08:44:16

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

litemotiv wrote:
ngoonee wrote:

Now if only there were more than 5 themes (none of which are Dark)....

"ngoonee, author of the first dark gtk3 theme!". smile

I wish. I suppose if it was a pure copy-paste job that'd be possible. Anything needing me to make decisions on colour and shading is destined for failure...


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2011-04-08 16:31:37

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

I added that on the wiki ! Nice info pyther !

Offline

#6 2011-04-09 00:09:13

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

pyther's solution (creating .config/gtk-3.0/settings.ini with [Settings] and gtk-theme-name) didn't work for me.  That is, nm-applet (the only thing that uses GTK3 on my system as far as I know) still used the ugly default theme.  Making .config/gtk-3.0 a symlink to /usr/share/themes/Adwaita/gtk-3.0 worked, however.  Any idea what I might be doing wrong?

Offline

#7 2011-04-09 02:13:48

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Are you using a gtk3 theme? Such as the default Adwaita? Also, make sure "Adwaita" has a capital A


Website - Blog - arch-home
Arch User since March 2005

Offline

#8 2011-04-09 04:24:27

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

pyther wrote:

Are you using a gtk3 theme? Such as the default Adwaita? Also, make sure "Adwaita" has a capital A

Yes, using Adwaita; I copied the sample code exactly from your first post.

Offline

#9 2011-04-09 06:42:08

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

@jjlindgren do you have gnome-themes-standard installed?


Give what you have. To someone, it may be better than you dare to think.

Offline

#10 2011-04-09 12:57:23

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

This solution doesn't work for me. I had to remove the exported GTK_PATH variable. Then the gtk3 theme is still not picked up from the settings.ini file. Only when I manually switch in the Xfce appearance theme changer to adwaita I get the nice gtk3 look. Any idea?

see https://bugs.archlinux.org/task/23655 and https://bugzilla.xfce.org/show_bug.cgi?id=7483

Offline

#11 2011-04-09 19:59:43

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

wonder wrote:

@jjlindgren do you have gnome-themes-standard installed?

Yes.

Offline

#12 2011-05-01 17:13:24

GourdCaptain
Member
Registered: 2009-04-18
Posts: 121

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

I have the gnome-themes-standard package installed as well, and the settings.ini file created, and it also doesn't work - still getting the ugly windows.

Offline

#13 2011-05-01 19:06:53

xrchz
Member
Registered: 2009-04-03
Posts: 36

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

I am also still getting the ugly windows, and I think the problem might be that the gnome-themes-standard package installs the theme with root root rw r- r- permissions.
Evince, for example, complains (on the terminal) (evince:17402): Gtk-WARNING **: Could not load named theme "Adwaita": Error parsing stylesheet

Offline

#14 2011-05-01 19:16:15

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

xrchz wrote:

... I think the problem might be that the gnome-themes-standard package installs the theme with root root rw r- r- permissions.
Evince, for example, complains (on the terminal) (evince:17402): Gtk-WARNING **: Could not load named theme "Adwaita": Error parsing stylesheet

Everyone is able to read the file, no one needs to be able to write or execute it. The permissions are fine.


Does the output of md5sum /usr/share/themes/Adwaita/gtk-3.0/* match

md5sum: /usr/share/themes/Adwaita/gtk-3.0/assets: Is a directory
4bb000e5532d5cf0fa64aec4893024e4  /usr/share/themes/Adwaita/gtk-3.0/gtk.css
529bebd2f8e6f7d9b6e07f6e806adfa3  /usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css
df8161134af1f13fc2e69c716ad8754d  /usr/share/themes/Adwaita/gtk-3.0/settings.ini

Website - Blog - arch-home
Arch User since March 2005

Offline

#15 2011-05-01 19:27:33

xrchz
Member
Registered: 2009-04-03
Posts: 36

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Oh yeah - good point about permissions! Sorry.
Looks like a match:

ramana@lois ~ % md5sum /usr/share/themes/Adwaita/gtk-3.0/*
md5sum: /usr/share/themes/Adwaita/gtk-3.0/assets: Is a directory
4bb000e5532d5cf0fa64aec4893024e4  /usr/share/themes/Adwaita/gtk-3.0/gtk.css
529bebd2f8e6f7d9b6e07f6e806adfa3  /usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css
df8161134af1f13fc2e69c716ad8754d  /usr/share/themes/Adwaita/gtk-3.0/settings.ini

Offline

#16 2011-05-03 06:06:30

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Hello everybody,

I am currently using i3-wm and trying to get some normal looking gtk3 apps. I made the .config/gtk-3.0/settings.ini like mentionned in the wiki, but get when loading a gtk3 app the following output :

example : (file-roller:5477): Gtk-WARNING **: Could not load named theme "Adwaita": Error parsing stylesheet

For information, I get the same md5sum output as showned previously :

"md5sum: /usr/share/themes/Adwaita/gtk-3.0/assets: est un dossier
4bb000e5532d5cf0fa64aec4893024e4  /usr/share/themes/Adwaita/gtk-3.0/gtk.css
529bebd2f8e6f7d9b6e07f6e806adfa3  /usr/share/themes/Adwaita/gtk-3.0/gtk-widgets.css
df8161134af1f13fc2e69c716ad8754d  /usr/share/themes/Adwaita/gtk-3.0/settings.ini"

Has anyone an idea to solve this issue ?

Thanks a lot for the replies !

Offline

#17 2011-05-03 13:14:21

wooptoo
Member
Registered: 2007-04-23
Posts: 78
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

jlindgren wrote:

Making .config/gtk-3.0 a symlink to /usr/share/themes/Adwaita/gtk-3.0 worked


This worked for me too smile This is the only solution that worked so far. Thank you jlindgren.

Offline

#18 2011-05-04 17:46:05

raymondcal
Member
Registered: 2010-06-16
Posts: 47

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Wonderful, pyther, your tip works directly like a charm, no need to symlink.

And more : you can set if you want toolbars with icons only, text only, icon+text or icon+text horizontal :

[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
gtk-toolbar-style=GTK_TOOLBAR_ICONS

Set the gtk-toolbar-style with :  GTK_TOOLBAR_ICONS,  GTK_TOOLBAR_TEXT,  GTK_TOOLBAR_BOTH, or  GTK_TOOLBAR_BOTH_HORIZ

Last edited by raymondcal (2011-05-04 17:47:58)

Offline

#19 2011-05-08 20:28:35

farvardin
Member
Registered: 2008-09-03
Posts: 120
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

It's probably related, but I can't click on GTK3 apps when I'm not using gnome3 (for example from KDE4 or openbox)

Offline

#20 2011-05-09 00:21:00

triplesquarednine
Member
Registered: 2011-04-12
Posts: 630

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

ngoonee wrote:

Thanks pyther. Now if only there were more than 5 themes (none of which are Dark)....

Atolm-gtk3 is dark, and looks good.

http://thedeviantmars.deviantart.com/ar … -206663190   (gtk3)

http://skiesofazel.deviantart.com/art/Atolm-191381339   (gtk2)

I also fixed the icon in gnome-tweak-tool to work properly on a dark background. ( + also included a link to my re-vamped-version of the original logo)

https://bbs.archlinux.org/viewtopic.php?id=118490

jordan

Offline

#21 2011-05-11 23:28:10

xrchz
Member
Registered: 2009-04-03
Posts: 36

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

With the symlink method, I get the following error:

ramana@lois ~ % evince
Gtk-Message: CSS: Error parsing stylesheet
/home/ramana/.config/gtk-3.0/gtk.css, line 100, char 31:
    @import url("gtk-widgets.css");
                                  ^

Offline

#22 2011-05-19 12:54:17

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

Things might have improved since the original post. I'm not using testing and for me using the Xfce Appearance settings to select a Gtk 3 theme (located in ~/.themes) works fine. No need to tweak anything.

And BTW I have finally found a dark Gtk3 theme: Xfce-dusk-gtk3
It's not as dark as the original Xfce-dusk, but it's ok.

Offline

#23 2011-05-19 13:25:05

xrchz
Member
Registered: 2009-04-03
Posts: 36

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

This is still broken, probably when not using any particular desktop environment.

ramana@lois ~ % cat ${XDG_CONFIG_HOME}/gtk-3.0/settings.ini
[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
ramana@lois ~ % evince

(evince:775): Gtk-WARNING **: Could not load named theme "Adwaita": Error parsing stylesheet

Offline

#24 2011-06-05 17:30:10

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

stqn wrote:

Things might have improved since the original post. I'm not using testing and for me using the Xfce Appearance settings to select a Gtk 3 theme (located in ~/.themes) works fine. No need to tweak anything.

I tried changing the theme to Adwaita in XFCE appearance settings, and it worked for both GTK 2 and GTK 3 apps.  The problem is, I don't want my GTK 2 apps to use the Adwaita GTK 2 theme (which is not the same as the Adwaita GTK 3 theme; as far as I can tell it's just Clearlooks under a different name).  There are other GTK 2 themes I like better.  I want to change *only* the GTK 3 theme to Adwaita.  Symlinking is still the only way that works to do that here.

Offline

#25 2011-06-29 02:39:40

s_tec
Member
Registered: 2011-06-29
Posts: 6

Re: GTK 3 Settings / [Solution] Ugly GTK3 Theme

I've figured out where the "Error parsing stylesheet" problems are coming from. The Adwaita theme needs librsvg installed to work correctly, since it uses SVG icons for its check boxes. A quick "pacman -S librsvg" solves the problem.

Last edited by s_tec (2011-06-29 03:03:36)

Offline

Board footer

Powered by FluxBB