You are not logged in.

#1 2017-08-08 23:57:34

nbd
Member
Registered: 2014-08-04
Posts: 389

How to set X resources for GTK program?

Hello,

I'm trying to set X resources for a GTK program - Gnubik - as recommended in the manual:

man wrote:

GNUbik uses the Athena widget set. Any widget's resource may be set to control menu labels, background colours etc. In addition, the following application resources set the colours of the cube faces:

I added the specified in the manual parameters to the ~/.Xresources and run "xrdb --merge ~/.Xresources". The "xrdb -query -all" command showed that modified resources settings are merged. But it hasn't made any effect. Why? Maybe the manual is outdated and modern GTK doesn't read .Xresources? What is other way to change X resources for an application?


bing different

Offline

#2 2017-08-09 00:21:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to set X resources for GTK program?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-08-09 00:51:24

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: How to set X resources for GTK program?

I have read the GTK Wiki, but it describes only the settings related to GTK itself and it's unclear how to change application-specific settings, which earlier were set in ~/.Xsettings. For example, Gnubik's manual instructs to change the default colors by setting the following application resources:

gnubik.color0: Red
gnubik.color1: Green
gnubik.color2: Blue
gnubik.color3: Cyan
gnubik.color4: Magenta
gnubik.color5: Yellow

Adding these lines to ~/.Xresources doesn't make effect. And from GTK Wiki it's unclear whether there is a new way to set these application specific options.


bing different

Offline

#4 2017-08-09 01:35:50

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: How to set X resources for GTK program?

As far as I know there is no way to change application specific properties unless the application has that feature built in.  Gtk apps all use the same configuration I think, which you can control through something like lxappearance, but it will apply to all gtk apps and not just one.

Offline

#5 2017-08-09 01:53:18

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: How to set X resources for GTK program?

circleface wrote:

As far as I know there is no way to change application specific properties unless the application has that feature built in.  Gtk apps all use the same configuration I think, which you can control through something like lxappearance, but it will apply to all gtk apps and not just one.

Well, the Gnubik does have the feature built-in: the manual says how to change the application specific appearance options (the colors) via X resources. I peeked the source code and see that indeed the program reads the color information from GTK via the names described in the manual: color0, color1 etc.. The question remains: how these settings are set in the current GTK version (in previous versions, they were read from ~/.Xresources). Or the current GTK dropped the possibility to make such tweakings?


bing different

Offline

#6 2017-08-09 05:38:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,171

Re: How to set X resources for GTK program?

The manual says "GNUbik uses the Athena widget set." ... and looking at the sources, the first thing I see is "colour-dialog.c"

Offline

Board footer

Powered by FluxBB