Bit of irony here, in that I'm not a superuser on this machine, but our development server is FreeBSD with X11 and GTK 2 installed on it. I found I'm able to use my own themes on the server by dropping them into ~/.themes and then by putting include "/home/my-user-name/.themes/path/to/theme/gtk-2.0/gtkrc" on the first line of ~/.gtkrc-2.0.

However, some of the themes I've used are dependent on murrine being installed. Is it possible to compile and include the engine without any superuser (su or sudo) access at all?

  • If your home directory is not mounted no-exec or similar restrictions then yes. Of course you can. It might be more work then asking root to install /usr/ports/x11-themes/gtk-murrine-engine and you will have to update it yourself when a newer version comes out, but nothing is stopping you from doing that.
    – Hennes
    Sep 5 '13 at 14:04
  • If you have determined that Murrine requires sudo then you are out of luck
    – Ramhound
    Sep 5 '13 at 14:05
  • @Ramhound Most of the instructions I've read are for people in full control of the machine, and the usual case seems to be to install the engine for all users to use. I'm still getting into the world of *nix from Windows and learning best practices, conventions, etc, and half of the problem is that I don't know where to look half the time while keeping my mindset that just about anything is possible if you look hard enough or ask questions. Me determining that murrine "required" sudo to install was based on what info I could find and prior (albeit limited) experience.
    – p0lar_bear
    Sep 5 '13 at 14:47

According to grawity's answer, the directory ~/.gtk-2.0 is in gtk's engine $PATH. If so, you should be able to download murrine's source from here and then run:

tar xvzf murrine-0.90.3.tar.gz
cd murrine-0.90.3/
./configure ---prefix=~/.gtk-2.0 --libdir=~/.gtk-2.0
make install

That should install the engine in ~/.gtk-2.0 for which you will not need root access.

  • 1
    It's actually the --libdir, since GTK doesn't look in ~/.gtk-2.0/lib/, but in ~/.gtk-2.0/ directly.
    – user1686
    Sep 5 '13 at 14:15
  • 1
    @grawity you mean --prefix=~/.gtk-2.0 --libdir=~/.gtk-2.0?
    – terdon
    Sep 5 '13 at 14:22
  • I got this output with either config when I run make, semicolons in place of line breaks: Making all in schema; make: don't know how to make murrine.xml. Stop; *** Error code 1; Stop in /m/home/<my name>/murrine-0.90.3.
    – p0lar_bear
    Sep 5 '13 at 14:54
  • Ah, I renamed schema/murrine.xml.in to murrine.xml and it compiled.
    – p0lar_bear
    Sep 5 '13 at 15:02
  • 1
    Alright, so, I got this working without incident, though I had to do some poking of things! First, I used murrine 0.98.1 instead, as the theme I was using was complaining about unknown identifiers. Second, I had to rename that above XML file. Third, after using the commands @terdon put as the answer, I had to move ~/.gtk-2.0/lib/gtk-2.0/{abi-version} to ~/.gtk-2.0/{abi-version}. After all of that, it's working 100%! And the theme I'm testing on is here. What can I say, I like Ambiance!
    – p0lar_bear
    Sep 5 '13 at 15:45

You can install theme engines in ~/.gtk-2.0. The last time I checked, the search path was:


where {abi-version} appears to be 2.10.0, {machtype} is the GNU-style machine type ($MACHTYPE in Bash), and {engine} is the engine name (e.g. murrine). The {prefix} is usually /usr on Linux, or the program's installation directory (e.g. C:\Program Files\Pidgin) on Windows.

  • 1
    How did you find out that path?
    – terdon
    Sep 5 '13 at 14:11
  • 2
    @terdon: I made it look for a nonexistent engine and watched with Process Monitor (strace on Linux).
    – user1686
    Sep 5 '13 at 15:27
  • Clever clever...
    – terdon
    Sep 5 '13 at 15:58
  • I have 'adwaita' and 'murrine' installed in ~/.gtk-2.0/engines/, yet GTK is not finding them when I try to set a theme that uses one of them; I get the "This theme will not look as intended because the required GTK+ theme engine 'adwaita' is not installed" error message. Is there anything that might be preventing my system (at work, so I don't have root access) from searching my ~/.gtk-2.0 directory on startup that I should check?
    – villapx
    Nov 16 '16 at 16:15

I wanted to compile and tweak the redmond theme. I followed @grawity's idea of using strace, but I placed a symlink to my compiled .so file, so I don't need to always copy it when I recompile.

I placed the symlink at /home/sashoalm/.gtk-2.0/engines, and made it point to my build directory where /home/sashoalm/Workspace/redmond/gtk2-engines-2.20.2/engines/redmond/.libs, where libredmond95.so is created by the compiler, and it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.