You are not logged in.

#1 2014-02-22 17:58:02

Ploppz
Member
Registered: 2013-09-14
Posts: 313

How do I change the colour of applications that use gtk2?

For example Eclipse. I want to change the colours of the userinterface in Eclipse. I figured out gtk2 must be responsible for that. Any idea how I would go about changing the colours?

Edit: I tried the second answer here http://stackoverflow.com/questions/2569 … in-eclipse

I have a file gtkrc in a directory:

style "eclipse" {
base[NORMAL] = "#FD06E3"
fg[SELECTED] = "#FDF6E3"
base[SELECTED] = "#073642"
fg[NORMAL] = "#073642"
text[NORMAL] = "#073642"
base[ACTIVE] = "#073642"
}
class "GtkWidget" style "eclipse"

And in the same directory I have an executable file:

#!/bin/sh
GTK2_RC_FILES=gtkrc ./gtkrc

But it says ./ecl: line 2: ./gtkrc: Permission denied, also when I run with sudo.

Last edited by Ploppz (2014-02-23 16:21:44)

Offline

#2 2014-02-22 22:29:00

VCoolio
Member
From: Netherlands
Registered: 2010-01-05
Posts: 120

Re: How do I change the colour of applications that use gtk2?

gtkrc may be executable but shouldn't be executed. You define GTK2_RC_FILES with modified gtkrc and then you execute the program that you want to use. So eclipse instead of gtkrc:

GTK2_RC_FILES=gtkrc eclipse

Now when eclipse starts it uses the gtkrc you pointed to instead of looking at your usual theme settings.

Offline

#3 2014-02-23 10:57:56

Ploppz
Member
Registered: 2013-09-14
Posts: 313

Re: How do I change the colour of applications that use gtk2?

Thanks! Just a quick question: Is there any resource on gtkrc? I mean what parameters you can change etc. and how to use it.

Edit:

I tried changing all the parameters of the gtkrc that I included in the first post to see what I would be able to change, and it doesn't seem like I can change much of the userinterface itself with only these parameters http://i.imgur.com/FUsJxy3.png, and the regular gray background of stuff is not changed http://i.imgur.com/kDGcDjl.png. Is there any documentation/list of parameters? I would love to change the tabs and buttons too. And also there is a fair amount of space between every element, is that also possible to change in gtkrc?

Last edited by Ploppz (2014-02-23 16:25:53)

Offline

Board footer

Powered by FluxBB