Install GTK Murrine to home directory?

3

1

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?

p0lar_bear

Posted 2013-09-05T13:59:56.697

Reputation: 419

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 – 2013-09-05T14:04:32.130

If you have determined that Murrine requires sudo then you are out of luck – Ramhound – 2013-09-05T14:05:18.397

@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 – 2013-09-05T14:47:34.183

Answers

4

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
make install

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

terdon

Posted 2013-09-05T13:59:56.697

Reputation: 45 216

1It's actually the --libdir, since GTK doesn't look in ~/.gtk-2.0/lib/, but in ~/.gtk-2.0/ directly. – user1686 – 2013-09-05T14:15:30.077

1@grawity you mean --prefix=~/.gtk-2.0 --libdir=~/.gtk-2.0? – terdon – 2013-09-05T14:22:35.903

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 – 2013-09-05T14:54:35.997

Ah, I renamed schema/murrine.xml.in to murrine.xml and it compiled. – p0lar_bear – 2013-09-05T15:02:19.923

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 – 2013-09-05T15:45:09.717

@p0lar_bear in that case, grawity was (as usual) correct and you should have used --prefix=~/.gtk-2.0 --libdir=~/.gtk-2.0. Please remember to accept one of the answers or to post your own explaining what you did so the question can be marked as asnwered. – terdon – 2013-09-05T15:58:00.347

5

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

~/.gtk-2.0/{abi-version}/{machtype}/engines/lib{engine}.dll
~/.gtk-2.0/{abi-version}/{machtype}/engines/lib{engine}.la
~/.gtk-2.0/{abi-version}/engines/lib{engine}.dll
~/.gtk-2.0/{abi-version}/engines/lib{engine}.la
~/.gtk-2.0/{machtype}/engines/lib{engine}.dll
~/.gtk-2.0/{machtype}/engines/lib{engine}.la
~/.gtk-2.0/engines/lib{engine}.dll
~/.gtk-2.0/engines/lib{engine}.la
{prefix}/lib/gtk-2.0/{abi-version}/{machtype}/engines/lib{engine}.dll
{prefix}/lib/gtk-2.0/{abi-version}/{machtype}/engines/lib{engine}.la
{prefix}/lib/gtk-2.0/{abi-version}/engines/lib{engine}.dll
{prefix}/lib/gtk-2.0/{abi-version}/engines/lib{engine}.la
{prefix}/lib/gtk-2.0/{machtype}/engines/lib{engine}.dll
{prefix}/lib/gtk-2.0/{machtype}/engines/lib{engine}.la
{prefix}/lib/gtk-2.0/engines/lib{engine}.dll
{prefix}/lib/gtk-2.0/engines/lib{engine}.la

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.

user1686

Posted 2013-09-05T13:59:56.697

Reputation: 283 655

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 – 2016-11-16T16:15:02.593

1How did you find out that path? – terdon – 2013-09-05T14:11:14.807

2@terdon: I made it look for a nonexistent engine and watched with Process Monitor (strace on Linux). – user1686 – 2013-09-05T15:27:43.627

Clever clever... – terdon – 2013-09-05T15:58:21.317

0

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!

sashoalm

Posted 2013-09-05T13:59:56.697

Reputation: 2 680