Dconf
   HOME

TheInfoList



OR:

dconf is a low-level configuration system and settings management tool. Its main purpose is to provide a back end to GSettings on platforms that don't already have configuration storage systems. It depends on
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever s ...
. It is part of
GNOME A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
3 and is a replacement for GConf.


Overview

dconf is a simple key-based configuration system. Keys exist in an unstructured database (but it is intended that keys that logically belong together are grouped together). Change notification is supported. Stacking of multiple configuration sources is supported. Mandatory keys are supported. The stacking can be done at "mount points". For example, the global system configuration can be mounted under inside of each user's configuration space. A single configuration source may appear at multiple points in the hierarchy. For example, in addition to stacking over the normal keys at , the system default keys may also appear at for inspection and modification by a system policy configuration utility.
PolicyKit Polkit (formerly PolicyKit) is a component for controlling system-wide privileges in Unix-like operating systems. It provides an organized way for non-privileged processes to communicate with privileged ones. Polkit allows a level of control ...
integration is planned so that a normal user may temporarily gain the ability to, for example, write to the keys under (or ). This means that programs like the
GNOME Display Manager GNOME Display Manager (GDM) is a display manager (a graphical login manager) for the windowing systems X11 and Wayland. The X Window System by default uses the XDM display manager. However, resolving XDM configuration issues typically invo ...
configuration utility no longer have to be run as root.


Software architecture

Since a typical GNOME login consists of thousands of reads and ideally 0 writes, dconf is optimized for reads. Typically, reading a key from dconf involves zero system calls and zero context switches. This is achieved with a simple file format that doubles both as the storage format for data in dconf and as an IPC mechanism between the clients and the server. Avoiding round trips and context switches is desirable in itself, but the real advantage comes from allowing the I/O scheduler in the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
to do a better job by saturating it with requests coming from all of the applications trying to read their keys (as opposed to a common configuration server serially requesting a single key at a time). Having all of the keys in a single compact binary format also avoids the intense fragmentation problems currently experienced by the tree-of-directories-of-xml-files approach. Writes are less optimized they traverse the bus and are handled by a "writer" a
D-Bus In computing, D-Bus (short for "Desktop Bus") is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project ...
service in the ordinary way. Change notification is also handled by the writer. The reason for having a bus service at all is that because getting the clients to synchronize on writing would be very difficult. The writer service doesn't have to be activated until the first write operation is performed. The service is completely stateless and can start and stop dynamically. The list of change notifications that an individual client is interested in is maintained by the bus daemon (as a D-Bus signal watch/match list).


dconf database

One dconf database consists of a single file in binary format, i.e. it is not a text-file. The format is defined as gvdb (GVariant Database file). It is a simple database file format that stores a mapping from strings to GVariant values in a way that is extremely efficient for lookups. The GNOME database file for each user is by default ~/.config/dconf/user, a file expected to be in GVDB format.


GVariant

GVariant is a strongly typed variant datatype used for all the values stored in dconf; it can contain one or more values along with information about the type of the values. A GVariant may contain simple types, like integers, or boolean values; or complex types, like an array of two strings, or a dictionary of key value pairs. A GVariant is also immutable: once it's been created, neither its type nor its content can be modified further. GVariant is useful whenever data needs to be serialized, for example when sending method parameters in DBus, or when saving settings using GSettings. GVariant is part of GLib. * https://developer.gnome.org/glib/stable/glib-GVariant.html * https://git.gnome.org/browse/glib/tree/glib/gvariant.c


GSettings

The GSettings class provides a high-level API for application for storing and retrieving their own settings. The utility program /usr/bin/gsettings is contained i
libglib2.0-bin
GSettings is part of
GIO Gio or GIO may refer to: People * Gio (nickname) * Gio (footballer, born 1984), Spanish * Gio (singer) (born 1990) * Gio people, an ethnic group in northeastern Liberia and Côte d'Ivoire Science and technology * Gi/o, protein subunits * GI ...
. which is part of GLib
libglib2.0-0
* https://developer.gnome.org/gio/stable/GSettings.html * https://git.gnome.org/browse/glib/tree/gio/gsettings.c


Documentation

A system administrator
guide
for dconf is available. Since version 0.2, dconf is licensed under the
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
version 2.1 "or later".


History


Release history


References


External links

* https://wiki.gnome.org/Projects/dconf * https://download.gnome.org/sources/dconf/ * https://gitlab.gnome.org/GNOME/dconf/ {{GNOME Configuration management GNOME Software that uses Meson