What is the purpose of gsettings?

I can’t understand, what is the purpose of gsettings since we have dconf?

Gsettings just makes it easier for app developers to work with Dconf. That’s it.

1 Like

GSettings is the public API for storing and retrieving application and desktop settings, and getting notifications on settings changes.

dconf is a backend, one of the various that GSetting has.

But why dconf is so rude then? :sweat_smile:

And can I use gsettings cli tool only with software that use glib?

What about having a look at the dconf Wikipedia article?

1 Like

I looked, but I think that doesn’t answer my question.

The think is, it’s stupid if I have to use multiple tools if I use software that use dconf but not glib.

The problem with all your questions is that you’re trying to reverse engineer your own fragmented knowledge, which results in two things:

  • you keep asking the same questions until you get the answer that conforms to what you already know
  • you are effectively conducting a denial of service on a group of volunteers, who have to stop doing what they are doing, and constantly re-negotiate with you what you want to hear

You have been given an answer: GSettings is the API that applications use to read, write, and get notified of settings changes. dconf is a backend to GSettings. The answer is authoritative, and it won’t change.

The actual issue is that you have been using the dconf CLI tool because you read somewhere that somebody had a problem and use dconf read or dconf write; that’s just because there is a lot of bad information on the Internet, especially with regards to Linux because Linux users have the tendency to tinker with their OS without understanding how the OS is put together; this is couple with the tendency in IT to cargo cult anything that looks like an example on a wiki page.

So, to remove any further issue: the dconf CLI utility is not meant to be used by end users; it’s an admin and development tool that is meant to be used by people who actually understand what a dconf database is. For everyone else outside of that small niche, there’s the gsettings CLI tool. Always use the gsettings CLI tool


I just try figure out, how modern GNOME works, after 5 years in i3 :sweat_smile: Everything is so new to me… I don’t try any harm for you.

What do you mean by this? Yeah, in the GLib name thread, I wanted confirmation for my info and also know about history of the name.

I don’t try change that fact. I just wondering reasons for this design. Read the title and note it isn’t “what is gsettings and dconf”.

I understand that the library contains functions/routines for configuration, but I don’t understand, why fragmentation? See:

now design is

               |                                           |                |
           GLib/Gsettings                               AnotLib         TemnerApp
    ___________|________________________              _____|________
   |          |                        |             |              |
nautilus   gsettings (cli-tool)   dconf-editor    GramerApp     anot-settings

and IMO this would be simpler

                     dconf (cli-tool)   dconf-editor
               |                      |                |
           GLib/Gsettings           AnotLib         TemnerApp
    ___________|______                |
   |                  |            GramerApp
nautilus            gedit

That diagram is incorrect. Right now it is actually more like this:

                     dconf (cli-tool)   dconf-editor
    |                  |              |                |
nautilus            gedit           AnotLib         TemnerApp

The point is for applications to be able to use the same code regardless of how the underlying settings are stored. E.g. on Windows, GSettings will use the Windows registry. On Linux, host applications use dconf, while sandboxed applications use GKeyfile backend. It all works seamlessly even though applications do not know which backend is being used. If applications used dconf directly, then either (a) settings wouldn’t work when sandboxed, or (b) you’d need a sandbox hole to access all host settings, which is actually what flatpaks did originally, but is nowadays unacceptable.


But what if some software that uses dconf doesn’t want to use GLib (and its GSettings)? And dconf-editor using GSettings right?

dconf-editor using GSettings right

Wrong. It’s a dconf editor.

But what if some software that uses dconf doesn’t want to use GLib (and its GSettings)?

That is purely academic, because drumroll dconf and its client library use glib. So you have glib. and GSettings. Why make your life hard then.


Side note: dconf is used as gsettings backend on Linux, but on Windows the registry is used instead.

  • “dconf-editor” on Linux is somehow like “regedit.exe” on Windows
  • “dconf” on Linux is somehow like the registry on Windows
  • gsettings is a portable high-level API to read/store settings in the OS’s preferred backend.