1

As background: Electronics engineer, follow suckless philosophy (where posible), no knowledge about X and and any kind of toolkits (GTK or Qt), using arch linux, cannot stand GNOME.

It bothers me that gtk3 package has dconf and gsettings dependence. I cannot find a compeling explanation of what gsettings is used for (other than manual pages and other internet bits), what are schemas, and what it has to do with GNOME DE.

Mainly I am asking silly questions:

  1. What is the practical usage of gsettings and what ties it to GNOME DE?
  2. What separates gtk3 rc files from gsettings?
  3. Any ways to avoid, or should I try to avoid gsettings, any alternatives?
0

Short answer

(as I understand this):

dconf is database system which keeps settings (GVariants) in database files and it is on the bottom.

dconf schemas are the files which contain structure of these database files.

gsettings is an API and a toolkit to store and retrieve this settings from and to database.


Long answer

(as explained in Wikipedia):

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 3 and is a replacement for GConf.


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.


GVariant: GVariant is a strongly typed value datatype. GVariant is a variant datatype; 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 which is part of GLib (libglib2.0-0).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.