7

I prefer to use gsettings over dconf-editor because dconf-editor lacks of command-line options to go to a schema directly (eg. I have to do "org - click - gnome -click - settings-daemon - click - plugins - click - power - click). One problem using gsettings is that I cannot see the "Description" and "Summary" fields that I get in dconf-editor. Is there any way to get these?

Best, Jürgen

2 Answers 2

5

It is not possible to do this with gsettings, as the option simply does not exist. There is extensive documentation on gsettings and the internals of the program at the official Gnome site.

However, there is an interesting project at github called gsettings-info that does exactly what you ask. It is a script that queries information about either schemas and/or keys from the gschema information and returns the same data about them that is displayed when you use dconf-editor.

You'll requiere Git and git xsltproc (library that it uses to read the gschema information)

sudo apt install git xsltproc

Obtain the program with:

git clone git://github.com/jmatsuzawa/gsettings-info.git
cd gsettings-info 

Now you can run the script

./gsettings-info <command>

You can either run it from the home folder (and occasionally update it by going to the folder and using git pull), or install to the system or place it in your ~/bin folder so it is available by just entering gsettings-info.

If you are running it from the downloaded folder, entering ./gsettings-info help will give all the options, as does the README and the information at the Github page.

You can find much information on both the schemas and keys. Here is an example of how to find data about certain keys. This assumes it is run from the downloaded folder, and so ./ is needed to run the script.

  1. To find out details about the particular keys of the chosen schema, enter:

    ./gsettings-info desc org.gnome.gnumeric.autocorrect
    

    which returns:

    init-caps: Autocorrect initial caps
    init-caps-list: Autocorrect initial caps
    first-letter: The autocorrect engine does not correct the initial caps for words in this list.
    first-letter-list: The autocorrect engine does not correct the first letter for words in this list.
    names-of-days: Autocorrect names of days
    replace: Autocorrect replace
    
  2. To show defaults and information for a particular key, use:

    ./gsettings-info show org.gnome.gnumeric.autocorrect init-caps
    

    which returns:

    KEY: init-caps
    TYPE: b
    SUMMARY: Autocorrect initial caps
    DESCRIPTION: Autocorrect initial caps
    DEFAULT: true
    

This seems to be exactly what your are looking for, and is about the only way to show this information on the command-line instead of in dconf-editor.

0

You can use gsettings describe to get the description of the key and gsettings range to get possible values for the key.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .