Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

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 require libxslt1.1 because that is the library that it uses to read the gschema information (and git to use git clone). You probably have both installed already, but if not, run:

sudo apt-get install libxslt1.1 git

Obtain the program with:

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

Now you can run the script (after making it executable), with ./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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.