8 ms·
Gnome re-created the registry because they needed features that plain text files don't have. I simply have a hook for my dotfile repo which calls "dconf dump /
by lima 10y ago
Gnome re-created the registry because they needed features that plain text files don't have.
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.
- willtim 10y agoThe issue for me is more that they recreated the windows registry with all its flaws. For example, when uninstalling an app, can every entry associated with that app be easily removed?
- okramcivokram 10y agoIf app is removed, are all the relevant dotfiles removed?
- bwat48 10y agoTouche
- willtim 10y agoThe registry was supposed to improve upon dotfiles. In practice there is often one dotfile to delete versus hundreds of scattered registry entries. If an Android app is removed, the local settings are also completely removed, because they didn't just copy the design of windows.
- lima 10y ago> hundreds of scattered registry entries 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.
- CaptSpify 10y agoCurious what features a plain-text file doesn't have that a registry would?
- lima 10y agoMost importantly, a stable API which can be concurrently used by multiple processes. 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).
- kosma 10y ago> However, on the desktop, many different application want to read and write keys. Tray applets, the system config panel, even your media player... 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.
- vetinari 10y agoConfiguration items like current theme or current default font are things, that all applications are interested in. If they want to have look and feel like the rest of the desktop, that is.
- deleted 10y ago[deleted]