dconf-read
Read a setting from the Dconf database
TLDR
Print a specific key value
Print a specific key [d]efault value
SYNOPSIS
dconf read KEY
dconf [--profile PROFILE] [--database DATABASE] read KEY
PARAMETERS
KEY
The full path to the configuration key to be read (e.g., /org/gnome/desktop/interface/text-scaling-factor/). This is a required argument.
--profile PROFILE
Specifies an alternative dconf profile to use, overriding the default.
--database DATABASE
Specifies a particular database within the active profile to read from. Used in conjunction with --profile or implicitly with the default profile.
--noprofile
Disables the use of any dconf profile, typically causing operations to default to the user database. Useful for specific debugging or isolated operations.
DESCRIPTION
The dconf-read command is a utility for interacting with the dconf configuration system. It allows users and scripts to retrieve the value associated with a specific key from the dconf database. Dconf serves as a low-level configuration system for GNOME and other applications, storing settings in a binary format. dconf-read is typically used to inspect current settings, often as part of troubleshooting or scripting configuration backups. It complements dconf-write for setting values and dconf-list for enumerating keys within a path. The dconf system is designed for speed and persistence, and dconf-read provides direct access to these stored preferences. Its output is the raw GVariant representation of the key's value.
CAVEATS
Permissions: Reading certain system-wide or protected keys might require elevated privileges or the correct user context.
Non-existent Keys: If the specified KEY does not exist, dconf-read will typically return an empty string or an error, depending on the dconf version and context.
Key Path Format: Keys must always be absolute paths, beginning with a forward slash (/).
Output Format: The output is the raw GVariant string representation, which might require further parsing in scripts, especially for complex types like arrays or dictionaries.
KEY PATH STRUCTURE
Dconf keys adhere to a hierarchical path structure, analogous to a file system. Each key represents a unique setting and starts with a leading slash (e.g., /org/gnome/desktop/interface/color-scheme). Understanding this structure is fundamental for accurately specifying keys to read.
VALUE TYPES AND REPRESENTATION
The values returned by dconf-read are presented in a GVariant string representation. This means boolean values appear as true or false, strings are enclosed in single quotes (e.g., 'hello'), numbers are unquoted, and arrays are represented with square brackets (e.g., ['item1', 'item2']). This format ensures consistent and machine-readable output.
HISTORY
Dconf was introduced as the default configuration system for GNOME 3, replacing the older GConf. Its development focused on performance, atomic updates, and a simpler data model, making it more efficient for desktop environments. dconf-read is an integral part of the core dconf utility, providing direct command-line access to the underlying binary database. Its utility became prominent with the widespread adoption of GNOME 3, offering a straightforward way to inspect configuration settings.
SEE ALSO
dconf(1), dconf-write(1), dconf-list(1), dconf-reset(1), gsettings(1)