Intalling gtk2 theme engine in HOME directory

I wrote this post because I installed various gtk theme engines in my $HOME, and every time I tried to use them with eclipse, I received this warning:

  • Gtk-WARNING **: Unable to locate theme engine in module_path: “clearlooks”

I knew I could install everything in /usr as usual, but I was decided to resolve my problem the hard way. First I tried the “obvious” thing: setting LD_LIBRARY_PATH to $HOME/lib, which is where I installed the theme engines without success. Google did not give me an easy answer to what to do neither. Most answers to the warning where about installing some gtk engine packages, which I had decided to avoid, or about setting LD_LIBRARY_PATH, which did not solve my problem. After countless forum solutions read, I realized that what I needed to know was what Gtk expected that module_path be, which I found here:

http://www.gtk.org/api/2.6/gtk/gtk-running.html

Finally, these are the steps I needed in order to use eclipse, or any other gtk+ application, with gtk themes (Clearlooks in my case).

Assuming that gtk theme engines are installed in $HOME/lib/gtk-2.0/2.10.0/engines, there are two options:

  1. Setting GTK_PATH before invoking eclipse.
  2. Creating a symbolic link to gtk module_path.

For the first option, type in a terminal:

> GTK_PATH=”$HOME/lib/gtk-2.0/2.10.0/engines” eclipse

For the second option, type:

>ln -s “$HOME/lib/gtk-2.0/2.10.0” “$HOME/.gtk-2.0”

and then invoke eclipse, or whatever program using gtk+, as usual.

Advertisements

Tags: , , ,

One response to “Intalling gtk2 theme engine in HOME directory”

  1. kinyip says :

    > GTK_PATH=”$HOME/lib/gtk-2.0/2.10.0/engines”

    For me, in the example above, I need to define

    GTK_PATH=”$HOME/lib/gtk-2.0/2.10.0/”

    ie. without “engines” in order to make my gtk application (emacs) not to complain.

    Thanks !

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

%d bloggers like this: