I simply have a hook for my dotfile repo which calls "dconf dump / > .dconf". This dumps the entire tree and it's nicely versioned in the repo.
I simply have a hook for my dotfile repo which calls "dconf dump / > .dconf". This dumps the entire tree and it's nicely versioned in the repo.
Getting/setting single values in a plain text config file is cumbersome and error-prone, and even if there's a library which is able to read that particular format, it often clobbers comments and formatting. For systems administration, you usually solve this by generating the entire config file from a template since nothing on the server should change your config files anyway.
However, on the desktop, many different application want to read and write keys. Tray applets, the system config panel, even your media player... They would inevitably conflict and you'd have to implement file-based locking.
Another topic: real-time notifications. If you modify the text size in the Gnome Control Panel, what happens is that the panel modifies the value in dconf and dconf sends a notification to all running Gnome applications. You could implement this using inotify, but you'd need code in each of your applications to open the config file, parse it and figure out which setting actually changed.
Single dconf lookups are really fast since everything is zero-copy and doesn't involve any syscalls. This is much faster than opening, reading and parsing config files.
dconf doesn't aim to replace all plain text config files. Storing the i3 or SSH configuration in dconf would be stupid (or even using dconf on a server to begin with).
If your applications directly read and store configuration keys belonging to other applications, you have way worse problems in your architecture than configuration file format.
Cut off one of these and brace for the whining, that gnome is dumbing everything down and locking up your settings.
What? The INI format is very simple and there are numerous libraries that handle it cleanly in any language.
> and even if there's a library which is able to read that particular format, it often clobbers comments and formatting.
What? These are primarily machine-readable configuration files. Why is formatting relevant? And how are comments relevant to dconf, since it uses a binary format anyway?
If a plain-text file isn't good enough, at least have the decency to use SQLite.
Lock files.
This is unique on Windows. I actually took a look at dconf on my machine and no application occupied more than one key.
GEdit sits in /org/gnome/gedit and virt-manager in /org/virt-manager as you'd expect.
I also hate Android's behavior, since there are situations where you want to keep them. If I remove GEdit for whatever reason, I expect it to keep my settings.
There are legitimate reasons to criticize Gnome, but this isn't one of them. dconf is totally reasonable and has significant advantages over plain text.