10

I have found an example of a schema that is referred two in two different ways, differing only in case, which is confusing to me.

Gsettings sees the schema name as com.canonical.Unity.Launcher, and does not accept com.canonical.unity.launcher as a valid schema name. On the other hand, dconf-editor only sees com.canonical.unity.launcher all lower-case, as seen in the screenshot.

If I change the key favorites in Gsettings, that change is reflected in dconf-editor, and vice-versa.

What's going on? Which is the correct schema name, com.canonical.Unity.Launcher, or com.canonical.unity.launcher?

Gsettings:

$ gsettings list-schemas | grep -i com.canonical.unity.launcher
com.canonical.Unity.Launcher
david@david-Aspire-5735:~$ $ gsettings list-recursively com.canonical.Unity.Launcher
com.canonical.Unity.Launcher favorite-migration '3.2.10'
com.canonical.Unity.Launcher favorites ['application://firefox.desktop', 'application://thunderbird.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices']
david@david-Aspire-5735:~$ gsettings list-recursively com.canonical.unity.launcher
No such schema 'com.canonical.unity.launcher'

dconf-editor:

Screenshot of dconf-editor, cropped

Flimm
  • 41,766

1 Answers1

8

Dconf schema tree is tricky and not always relevant to actual schema names.

For example, under apps you can find update-manager, but you will not find apps.update-manager schema using gsettings. Valid schema name is com.ubuntu.update-manager, and it isn't shown in Dconf where it actually should be. Correct schema name in Dconf can be found below the keys list, at the grey field with Description and Default value. (See screenshot) Topmost entry shows real Schema name.

So I'd trust gsettings output. In your case com.canonical.Unity.Launcher is the valid schema name and its case really matters.

Screenshot highlighting schema field

Flimm
  • 41,766
whtyger
  • 5,810
  • 3
  • 33
  • 46
  • Interesting, I didn't notice the schema field in dconf-editor. If the tree path doesn't always match the schema name, what does it match? – Flimm Jan 17 '13 at 20:35
  • 1
    Maybe these schema names were changed during development process and weren't fixed in dconf frontend yet. Or simply forgotten. There are also several dconf settings that have no schema at all. org>gtk>settings>file-chooser, for example. I wonder how they can be changed using gsettings? – whtyger Jan 18 '13 at 13:34
  • BTW, these options without schemas can be changed using dconf in terminal. Check dconf --help for all options. For example, dconf write /org/gtk/settings/file-chooser/show-hidden true turns option on. Autocompletion of the key name works also when typing in terminal. Cool! – whtyger Apr 17 '13 at 10:15