Re: overridding the theme in ~.gtkrc-2.0



On Tue, 21 Aug 2007 08:42:04 -0400
zentara <zentara1 sbcglobal net> wrote:

I'm toying around with the idea of having a custom resource
directory for an app, like ~./myapp , and have a custom .gtkrc-2.0 
in it to parse at the beginning of the script, to get custom colors.

However, it seems it is not possible, as the ~.gtkrc-2.0 file seems
to override what is parsed in the script. 
For instance, I have 2 themes, Z and BumbleBee.

Is there a way to force the app to use BumbleBee, without modifying ~.gtkrc-2.0?
Thanks,
zentara

Well Daniel Kasak answered off-list, and his solution works, so I post it.

---------------------------------------------------------------------------------------------
Is there a way to force the app to use BumbleBee, without modifying ~.gtkrc-2.0?  

There's probably a 'proper' way to do this, but anyway I'll show you the
way *I* do it.

Set the environment variable GTK2_RC_FILES to the path of your gtkrc
file. For example, I have a dark theme, but Eclipse looks like barf when
using it, so I start eclipse:

GTK2_RC_FILES=/usr/share/themes/Aurora-looks/gtk-2.0/gtkrc eclipse-3.2

Dan
-----------------------------------------------------------------------------------------------

So you setup a wrapper script, and it will override the default ~.gtkrc-2.0

##############################
#!/bin/sh
export GTK2_RC_FILES='/usr/local/share/themes/Bumblebee/gtk-2.0/gtkrc' 
./myapp_w-custom-rc
###############################

zentara


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]