3

Using a fairly simple schema, with a single boolean key, I have not been able to get dconf-editor to accept that the key is actually defined anywhere and when I navigate to the key from dconf-editor, I get a warning that the key has no schema and suggests that I delete it.

gsettings (the command line tool) allows me to extract the description just fine, indicating that the schema is installed correctly. Manipulating and reading the key through gsettings seems to work fine and the result does show up in dconf-editor in real time.

My schema:

<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="example-schema">
  <schema
    id="org.example.schema"
    path="/org/example/schema/"
    >
    <key name="boolean_value" type="b">
      <default>false</default>
      <summary>A boolean value</summary>
      <description>A value that may be either true or false</description>
    </key>
  </schema>
</schemalist>

I have placed the schema in /usr/share/glib-2.0/schemas and then run glib-compile-schemas . when inside /usr/ share/glib-2.0/schemas. After this, when I query with gsettings, the schema does show up and I can access the boolean_value key.

I am developing this on Fedora 31 (there's no Ask Fedora), with dconf-editor 3.34.4 and gsettings version 2.62.5.

Clearer
  • 169
  • 1
    To start with, which version of Linux have you installed  (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, et al.) , and which release number? Are you using virtualization, and if so, which package? Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our channel to you. All facts about your system should go in the Question with [edit] – K7AAY Mar 12 '20 at 18:53
  • dconf and gsettings are 2 different tools. for more info please follow https://askubuntu.com/questions/249887/gconf-dconf-gsettings-and-the-relationship-between-them – nobody Mar 13 '20 at 13:30
  • @nobody The question you link to does not seem relevant here. I am talking about an apparant difference in what dconf-editor and the CLI tool gsettings, reports when querying the same dconf based database. gconf is not relevant here. – Clearer Mar 13 '20 at 13:42

1 Answers1

3

dconf-editor doesn't actually do any proper introspection of the database, instead it maps between known paths and id's and uses that to figure out how to describe a key. This list is hardcoded into the program and requires a recompile to update.

The result is that, unless your schema is in that list, dconf-editor will not know about it; if you want your user to get nice feedback from dconf-editor, you need to modify their version of the program, compile it and then install it.

Clearer
  • 169
  • More info here: https://askubuntu.com/questions/416556/shouldnt-dconf-editor-and-gsettings-access-the-same-database – tsilvs Jan 21 '24 at 16:27