LinuxCommandLibrary

dconf

Read or write GNOME configuration settings

TLDR

Print a specific key value

$ dconf read /[path/to/key]
copy

Print a specific path sub-directories and sub-keys
$ dconf list /[path/to/directory]/
copy

Write a specific key value
$ dconf write /[path/to/key] "[value]"
copy

Reset a specific key value
$ dconf reset /[path/to/key]
copy

Watch a specific key/directory for changes
$ dconf watch /[path/to/key|/path/to/directory]/
copy

Dump a specific directory in INI file format
$ dconf dump /[path/to/directory]/
copy

SYNOPSIS

dconf [OPTION...] COMMAND [ARGS…]

PARAMETERS

-h, --help
    Print help and exit

--version
    Print version information and exit

--channel=CHANNEL
    Use given channel (user, system, or @app) instead of default

dump [PATH]
    Dump directory contents to stdout in INI-like format

list PATH
    List keys and subdirectories in path

read KEY
    Print value of given key

write KEY VALUE
    Set key to given GVariant value

reset [-f] PATH
    Reset paths to schema defaults (-f forces recursive)

reset -f PATH
    Force recursive reset

load PATH
    Load settings from stdin INI format into path

watch PATH
    Watch path for changes and print them

monitor
    Monitor all database changes

update
    Reload database and notify watchers

DESCRIPTION

dconf is a low-level key/value configuration storage system used primarily by GNOME Shell and applications built with GTK. It replaces the older GConf system and stores settings in a binary database file per user, typically at ~/.config/dconf/user. The dconf command provides a command-line interface to read, write, list, dump, load, reset, monitor, and update these settings.

Configuration paths follow a hierarchical structure like /org/gnome/desktop/interface/gtk-theme, with values in GVariant format (e.g., strings, booleans, integers, lists). It's ideal for scripting, debugging, or bulk configuration changes. Unlike higher-level gsettings, dconf operates directly on the database, bypassing schema validation, which allows flexibility but risks inconsistencies.

Most changes take effect immediately if the dconf-service is running, but some require dconf update or application restarts. It's binary format makes it non-human-readable without tools; use dconf dump for text exports. Widely used in desktop environments like GNOME, MATE, and Cinnamon.

CAVEATS

Direct edits bypass GSettings schemas and validation, potentially breaking apps. Binary DB not human-editable; always backup before bulk ops. Requires dconf-service (systemd user service) for live updates. System channel needs root.

EXAMPLES

dconf read /org/gnome/desktop/interface/gtk-theme
dconf write /org/gnome/desktop/interface/gtk-theme 'Adwaita-dark'
dconf dump /org/gnome/ > settings.ini
dconf load /org/gnome/ < settings.ini
dconf reset -f /org/gnome/nautilus/

VALUE FORMAT

Uses GVariant syntax: strings '"value"', bools true, ints 42, arrays [@as []], etc. See gvSpecifier in GLib docs.

HISTORY

Introduced in 2011 with GNOME 3.1 by Ryan Lortie (Red Hat) as GConf successor. Evolved through GNOME 3.x for better performance and atomic updates. Now core to GNOME 40+ and derivatives.

SEE ALSO

gsettings(1), dconf-editor(1), gconftool-2(1)

Copied to clipboard