For example :

dconf dump / | grep mouse

So if I want to make a gsettings command based on this output, I look to gsettings to list the schemas, but....

(output edited to include only likely candidates ):

gsettings list-schemas | grep mouse

So it is not clear to me which of these mouse schemas I should use. My understanding is that gsettings is a command line interface to the dconf database, but there is no clear correspondence between gsettings data and dconf data -- as far as I can see.

Can someone explain or point me to explanatory documentation. Thanks.

  • Well open up dconf-editor & see if there is a org.mate.desktop.peripherals.mouse schemas. Also keep in mind that dconf dump is not all inclusive, it only returns keys that aren't default values. – doug Aug 11 '18 at 13:47

Typically, dconf schemas translate nicely into gsettings schemas by replacing slashes with dots and vice versa.

In your example, org.mate.peripherals-mouse is the closest matching for what I'd expect to be a static schema.

However, not all gsettings schemas translate nicely. There's something known as relocatable schemas:

A relocatable schema is what you need when you need multiple instances of the same configuration, stored separately. A typical example for this is accounts: your application allows to create more than one, and each of them has the same kind of configuration information associated with it.

For such cases, schema also requires a particular path added to it. For example,

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ dash-blur-experimental 1

Here's another example from one of Budgie desktop schemas:

$ dconf write /com/solus-project/budgie-panel/panels/{5f6251f2-9d09-11e8-be4b-d053493d53fd}/size 52
$ gsettings set com.solus-project.budgie-panel.panel:/com/solus-project/budgie-panel/panels/{5f6251f2-9d09-11e8-be4b-d053493d53fd}/ size 52

Typically paths for relocatable gsettings schemas are the same as for dconf, but it's not guaranteed from what I understand. Manual way would be to run dconf watch / and use GUI buttons/sliders/preferences menus to figure out which schemas are controlled by those.

  • Ah so: dconf write schemas follows the dconf dump schemas. gsettings is a somewhat different schema system. For CLI to dconf, I can use dconf write. This is perfect. Thank you. – Stephen Boston Aug 14 '18 at 1:20
  • @StephenBoston You're welcome. Just worth mentioning that gsettings set is generally preferred, but dconf write is absolutely fine. They're somewhat different but related as frontend and backend. gsettings is the frontend – Sergiy Kolodyazhnyy Aug 14 '18 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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