Dconf

Last updated
dconf
Developer(s) The GNOME Project (Allison Lortie)
Initial releaseSeptember 16, 2009;14 years ago (2009-09-16)
Stable release
0.40.0 [1]   OOjs UI icon edit-ltr-progressive.svg / 13 March 2021;2 years ago (13 March 2021)
Repository
Written in C
Type Configuration, settings management
License GNU Lesser General Public License
Website wiki.gnome.org/Projects/dconf
GNOME Tweak Tool gives access to a certain popular subset of the desktop settings. GNOME Tweak Tool 3.32 screenshot.png
GNOME Tweak Tool gives access to a certain popular subset of the desktop settings.

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. It is part of GNOME as of version 3, and is a replacement for GConf.

Contents

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 /system/ 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 /user/, the system default keys may also appear at /default/ for inspection and modification by a system policy configuration utility.

PolicyKit integration is planned so that a normal user may temporarily gain the ability to, for example, write to the keys under /system/ (or /default/). This means that programs like the GNOME Display Manager configuration utility no longer have to be run as root.

dconf is loosely the GNOME equivalent of the Windows Registry.

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[ citation needed ] comes from allowing the I/O scheduler in the kernel 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.

dconf Architecture Architecture de dconf.png
dconf Architecture

Writes are less optimized  they traverse the bus and are handled by a "writer"  a D-Bus 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.[ citation needed ]

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.

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 in libglib2.0-bin.

GSettings is part of GIO. [2] which is part of GLib. libglib2.0-0

Documentation

A system administrators guide for dconf is available. Since version 0.2, dconf is licensed under the LGPL version 2.1 "or later".

History

Release history

VersionRelease dateSignificant changes
0.12009-09-18
0.22009-10-27
0.32010-05-25
0.42010-07-12
0.52010-09-15
0.62010-12-21
0.72011-05-09
0.82011-07-26
0.92011-09-19
0.102011-09-26
0.112012-03-19
0.122012-05-01
0.132012-08-20
0.142012-11-01
0.152013-02-11
0.162013-07-16
0.172013-09-16
0.182013-09-23
0.192014-03-17
0.202014-03-24dconf compile: always write little endian
0.212014-07-22
0.222014-09-19
0.232015-03-16split dconf-editor into a separate package
0.242015-03-23
0.252015-12-16
0.262016-03-23libdbus-1 back-end removed; dconf now always uses GDBus
0.272017-10-17Port to Meson build system (#784910)

Related Research Articles

<span class="mw-page-title-main">Xfce</span> Desktop environment

Xfce or XFCE is a free and open-source desktop environment for Linux and other Unix-like operating systems.

<span class="mw-page-title-main">GNOME Files</span> File manager

GNOME Files, formerly and internally known as Nautilus, is the official file manager for the GNOME desktop. Nautilus was originally developed by Eazel with many luminaries from the tech world including Andy Hertzfeld (Apple), chief architect for Nautilus. The nautilus name was a play on words, evoking the shell of a nautilus to represent an operating system shell. Nautilus replaced Midnight Commander in GNOME 1.4 (2001) and has been the default file manager from version 2.0 onwards.

<span class="mw-page-title-main">SQLite</span> Serverless relational database management system (RDBMS)

SQLite is a database engine written in the C programming language. It is not a standalone app; rather, it is a library that software developers embed in their apps. As such, it belongs to the family of embedded databases. It is the most widely deployed database engine, as it is used by several of the top web browsers, operating systems, mobile phones, and other embedded systems.

<span class="mw-page-title-main">CUPS</span> Computer printing system

CUPS is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer.

<span class="mw-page-title-main">Configuration file</span> Software file used to configure the initial settings for a computer program

In computing, configuration files are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system settings.

<span class="mw-page-title-main">GConf</span> Software

GConf was a system used by the GNOME desktop environment for storing configuration settings for the desktop and applications. It is similar to the Windows Registry.

<span class="mw-page-title-main">Windows Registry</span> Database for Microsoft Windows

The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and user interfaces can all use the registry. The registry also allows access to counters for profiling system performance.

<span class="mw-page-title-main">GLib</span> Software library

GLib is a bundle of three 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 since.

An INI file is a configuration file for computer software that consists of a text-based content with a structure and syntax comprising key–value pairs for properties, and sections that organize the properties. The name of these configuration files comes from the filename extension INI, for initialization, used in the MS-DOS operating system which popularized this method of software configuration. The format has become an informal standard in many contexts of configuration, but many applications on other operating systems use different file name extensions, such as conf and cfg.

D-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, initiated by GNOME developer Havoc Pennington to standardize services provided by Linux desktop environments such as GNOME and KDE.

<span class="mw-page-title-main">GNOME Archive Manager</span> Archive manager of the GNOME desktop environment (former File Roller)

Archive Manager is the file archiver of the GNOME desktop environment.

<span class="mw-page-title-main">NetworkManager</span> Software

NetworkManager is a daemon that sits on top of libudev and other Linux kernel interfaces and provides a high-level interface for the configuration of the network interfaces.

<span class="mw-page-title-main">Tiling window manager</span> Window manager with non-overlapping frames

In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more common approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor.

<span class="mw-page-title-main">Log4j</span> Java-based logging software

Apache Log4j is a Java-based logging utility originally written by Ceki Gülcü. It is part of the Apache Logging Services, a project of the Apache Software Foundation. Log4j is one of several Java logging frameworks.

defaults is a command line utility that manipulates plist files. Introduced in 1998 OPENSTEP, defaults is found in the system's descendants macOS and GNUstep.

<span class="mw-page-title-main">Vala (programming language)</span> Programming language

Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system.

GVfs is GNOME's userspace virtual filesystem designed to work with the I/O abstraction of GIO, a library available in GLib since version 2.15.1. It installs several modules that are automatically used by applications using the APIs of libgio. There is also FUSE support that allows applications not using GIO to access the GVfs filesystems.

<span class="mw-page-title-main">GIO (software)</span>

GIO is a library, designed to present programmers with a modern and usable interface to a virtual file system. It allows applications to access local and remote files with a single consistent API, which was designed "to overcome the shortcomings of GnomeVFS" and be "so good that developers prefer it over raw POSIX calls."

<span class="mw-page-title-main">GNOME</span> Desktop environment for Linux and other Unix-like systems

GNOME, originally an acronym for GNU Network Object Model Environment, is a free and open-source desktop environment for Linux and other Unix-like operating systems.

<span class="mw-page-title-main">OCRFeeder</span>

OCRFeeder is an optical character recognition suite for GNOME, which also supports virtually any command-line OCR engine, such as CuneiForm, GOCR, Ocrad and Tesseract. It converts paper documents to digital document files and can serve to make them accessible to visually impaired users.

References

  1. "Release 0.40.0". 13 March 2021. Retrieved 10 April 2021.
  2. "gio/gsettings.c · master · GNOME / GLib". GitLab. Retrieved 22 April 2018.[ permanent dead link ]