Gtk2 and Gtk3 for non-Gnome users

Posted: June 3, 2011 in Uncategorized

I’m over gnome. Even when I was a gnome user I did minimal gnome installs. However, I like many still use many gtk applications. Most of the applications I use are gtk applications. However, I don’t use a DE, I either use xfce4.8 or compiz as a standalone wm.

However, I still want my desktop to look nice. Now with some of the gtk applications I use adopting gtk3, such as Nautilus and Gedit, I want my gtk2 and gtk3 apps to use the same icon and gtk theme.

The first step to acheiving this is using icon and gtk themes that support both gtk2 and gtk3. I went over to gnome-looks and selected the “Zukitwo” theme.

To change gtk themes without installing an application is rather simple. However, there are two seperate files for gtk2 and gtk3 which you must edit. Below are examples of the two files on my system.

## ~/.gtkrc-2.0
## Edit GTK2 Theme Settings
gtk-theme-name="Zukitwo-Dark"
gtk-icon-theme-name="Tango"
gtk-font-name="Zekton 10"
gtk-toolbar-style=2
## ~/.config/gtk-3.0/settings.ini
## Edit GTK3 Theme Settings
## Create this File if it doesn't already exist
[Settings]
gtk-theme-name = Zukitwo-Dark
gtk-icon-theme-name = Tango
gtk-fallback-icon-theme = gnome
# next option is applicable only if selected theme supports it
gtk-application-prefer-dark-theme = true
# set font name and dimension
gtk-font-name = Zekton 10

Here is the link to the Zukitwo theme that I used.

http://gnome-look.org/content/show.php/Zukitwo?content=140562

Advertisements
Comments
  1. ColdFeetBob says:

    Also, I think that settings.ini should begin with
    [Settings]

    • zitzlinux says:

      Yes, you’re right, it should begin with [Settings]. My mistake, it’s fixed now. 🙂
      Does it fix your problem if you add [Settings]? You need to be sure that the theme and icons both are working with gtk3 and the settings should take effect the next time you start a gtk3 applciation.

      • ColdFeetBob says:

        yes, thanks – it’s working now. But the problem was elsewhere anyway: in the ~/.config/gtk-3.0 directory, you need to copy the entire content of the gtk-3.0 directory of the theme you choose. A symlink will do.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s