Gtk theme won't apply in Fluxbox

5,088

I had the same issue a while ago: it's because you're using Gnome 3! Gnome 3 uses GTK3 not GTK2, so all those awesome themes now need to be completely reworked. The most difficult problem I ran in to was locating a complete theme that included GTK2+GTK3.

To set your theme for GTK3, while not running the GNOME settings daemon, create this file.

~/.config/gtk-3.0/settings.ini

Here is an example from my current config.

[Settings]
gtk-theme-name = Elegant_Brit
gtk-fallback-icon-theme = areao43
gtk-font-name = Gill Sans Std 10

The syntax must be exact, any extra quoting throws it off.

I actually just noticed, you said you are running the gnome-settings-daemon. People on other forums, have had trouble in certain distros (Arch specifically). The transition times in the F/OSS world are always unforgiving. Personally, I run a plain Openbox session and use nautilus. I found ditching the GNOME config tools, and just doing the settings myself, was actually not difficult.

All the guides for pure Openbox are relevant, plus this new GTK3 information. The Arch wiki is actually very helpful, I'm a Debian guy and use it all the time.

Chromium works because it approximates your current GTK2 theme. It actually contains its own cross platform native widget toolkit.

Share:
5,088

Related videos on Youtube

vanjadjurdjevic
Author by

vanjadjurdjevic

I'm a web developer and designer, Linux (Fedora) enthusiast, musician... basically a very witty guy. (so they say) ^_^

Updated on September 18, 2022

Comments

  • vanjadjurdjevic
    vanjadjurdjevic almost 2 years

    I installed my Arch Linux with Gnome 3 and Fluxbox on top of it, and I use Fluxbox as the default, but I have this weird problem that I can't manage to fix. I set my theme for Fluxbox and that is working perfectly. I set the gtk2 theme and it is not working (well partially I right click in Chromium and I see the styling). However, when I open nautilus or gnome-terminal, or any other window that uses gtk for styling doesn't apply. Here is the screenshot (notice in the third picture, the menu looks like an X WM menu):

    styling doesn't apply : nautilus; terminal

    see the menu line where file, edit... can be found and also notice the button near the home button

    Screenshot of the unstyled menu

    I tried that in my gnome session and it works without a problem (in fallback mode). I tried one of those gtk-theme changer and it says that the theme, that i want, is set but it is only seen in chromium. It is all grey and old (Like win98 :D) Note : I tried to run gnome-settings-daemon in my terminal and it says "command not found" but when i check this package with pacman : it says [installed]

    enter image description here

    • amphetamachine
      amphetamachine over 12 years
      Please check the contents of ~/.gtkrc* and try running the gtk-demo program. If you can, try executing strace gtk-demo to see what files it's accessing.
    • vanjadjurdjevic
      vanjadjurdjevic over 12 years
      I have gtkrc-2.0. It contains the auto generated code for the theme and a link to the .gtrkrc-2.0.mine, but i noticed that there is not .gtkrc-2.0.mine in ~/
  • vanjadjurdjevic
    vanjadjurdjevic over 12 years
    I'm using network-manager, and that is network-manager-applet
  • J. M. Becker
    J. M. Becker over 12 years
    ... I assumed you didn't have that file, Which is why I wrote "create this file". Follow my instructions, your themes will appear on your gtk3 applications when not running gnome. Follow my example, and replace my theme choices with yours.
  • J. M. Becker
    J. M. Becker over 12 years
    And don't try and type in a gtk2 only theme, you need to make sure you have a gtk3 theme specified. If you already have a theme working in gnome, then that theme can be used. I mentioned I use Openbox, because all the non-Openbox specific configs are still relevant. You would have to specify your gtk3 theme, if using Openbox, Fluxbox, Blackbox, IceWM... or any strait WM.
  • vanjadjurdjevic
    vanjadjurdjevic over 12 years
    this worked perfectly but one more question... where to put the themes when i Download them? ~/.themes?
  • J. M. Becker
    J. M. Becker over 12 years
    You can put themes in ~/.themes, for just your user. Or /usr/share/themes/ for all users. I'm not sure if Arch uses /usr/share/themes/, but i would guess so.