After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756174 - Add a tool to inspect all xsettings from the command line
Add a tool to inspect all xsettings from the command line
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-07 09:35 UTC by Timm Bäder
Modified: 2015-10-10 21:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add gtk-dump-xsettings (2.69 KB, patch)
2015-10-07 09:35 UTC, Timm Bäder
none Details | Review
Add gtk-dump-xsettings (2.78 KB, patch)
2015-10-07 16:04 UTC, Timm Bäder
none Details | Review
Add gtk-query-settings (5.46 KB, patch)
2015-10-10 07:50 UTC, Timm Bäder
committed Details | Review

Description Timm Bäder 2015-10-07 09:35:59 UTC
Created attachment 312805 [details] [review]
Patch to add gtk-dump-xsettings

Now and then I get bug reports from people who e.g. don't see the app menu even though my application checks the gtk-shell-shows-app-menu setting and handles a FALSE there appropriately, e.g. by showing the GMenu in an GtkMenuButton or in some other way.

In those cases, I'd find it very useful if I could tell them to run gtk-dump-xsettings, check the gtk-shell-shows-app-menu value and complain to the developers of the respective desktop environment if it reports a wrong value there.

Attached is a patch for such a tool, it simply iterates over the properties of the default GtkSettings object and prints their name and value.
Comment 1 Timm Bäder 2015-10-07 16:04:46 UTC
Created attachment 312835 [details] [review]
Add gtk-dump-xsettings

Avoid some memory leaks.

I've been told on IRC that there's supposedly some GDK_DEBUG value that I could
use instead, but I've not found the correcnt one in the docs. Which one would that be?
Comment 2 Matthias Clasen 2015-10-07 16:09:03 UTC
will this actually give you the xsettings values, or the gtksettings defaults ? not sure if we need to enter the mainloop and wait for roundtrips to return before we get the xsettings back from the xsettings manager.
Comment 3 Timm Bäder 2015-10-07 16:15:12 UTC
I can't try all of them, but changing e.g. the gtk-enable-animations setting using gnome-tweak-tool and then running gtk-dump-xsettings gives me the new value (FALSE, the default being TRUE). Same works for gtk-theme and gtk-application-prefer-dark-theme.
Comment 4 Matthias Clasen 2015-10-07 16:46:47 UTC
that would indicate that it works, I guess
Comment 5 Matthias Clasen 2015-10-07 18:00:52 UTC
Review of attachment 312805 [details] [review]:

Looks good as a first cut. Please add a brief man page for it (eg see what I've done for gtk-builder-tool)

It might be nice to allow querying individual properties, like so:

$ gtk-dump-xsettings cursor
gtk-cursor-blink TRUE
gtk-cursor-blink-time 1200
Comment 6 Matthias Clasen 2015-10-07 18:02:24 UTC
Oh, one more thing: this doesn't look specific to xsettings at all, so the name is a bit misleading. How about gtk-query-settings ?
Comment 7 Timm Bäder 2015-10-10 07:50:42 UTC
Created attachment 313010 [details] [review]
Add gtk-query-settings

Tried adding the manpage for it, but I'm not sure how to reall test that
in a jhbuild shell :(
Comment 8 Matthias Clasen 2015-10-10 21:29:30 UTC
Attachment 313010 [details] pushed as 7aa2bfd - Add gtk-query-settings