LinuxCommandLibrary

gsettings

Modify GNOME configuration settings

TLDR

Set the value of a key. Fails if the key doesn't exist or the value is out of range

$ gsettings set [org.example.schema] [example-key] [value]
copy

Print the value of a key or the schema-provided default if the key has not been set in dconf
$ gsettings get [org.example.schema] [example-key]
copy

Unset a key, so that its schema default value will be used
$ gsettings reset [org.example.schema] [example-key]
copy

Display all (non-relocatable) schemas, keys, and values
$ gsettings list-recursively
copy

Display all keys and values (default if not set) from one schema
$ gsettings list-recursively [org.example.schema]
copy

Display schema-allowed values for a key (helpful with enum keys)
$ gsettings range [org.example.schema] [example-key]
copy

Display the human-readable description of a key
$ gsettings describe [org.example.schema] [example-key]
copy

SYNOPSIS

gsettings [OPTION...] COMMAND [ARG...]

PARAMETERS

--help
    Show help options.

--version
    Show the program's version.

get SCHEMA[:PATH] KEY
    Get the value of a key.

set SCHEMA[:PATH] KEY VALUE
    Set the value of a key.

reset SCHEMA[:PATH] KEY
    Reset a key to its default value.

list-schemas
    List installed schemas.

list-keys SCHEMA[:PATH]
    List keys in a schema.

list-children SCHEMA[:PATH]
    List children of a path.

list-recursively
    List all keys recursively.

monitor SCHEMA[:PATH] KEY
    Monitor changes to a key.

writable SCHEMA[:PATH] KEY
    Check if a key is writable.

describe SCHEMA[:PATH] KEY
    Get a description of a key.

DESCRIPTION

The gsettings command provides a command-line interface to the dconf configuration system. dconf is a low-level configuration system and its primary purpose is to provide a backend for GSettings, which is used by applications to store their settings. The gsettings command allows you to read, write, and monitor settings.
It is generally not recommended to directly manipulate settings via gsettings unless you are a developer or advanced user and understand the implications of changing system settings. GUI tools like dconf-editor provide a more user-friendly interface and help prevent accidental misconfiguration.
gsettings is essential for automating configuration tasks, troubleshooting settings-related issues, and advanced customization of the GNOME desktop environment.

CAVEATS

Incorrect usage of gsettings can lead to system instability or application malfunctions. Always exercise caution when modifying settings and consult relevant documentation or forums before making changes.

SCHEMAS AND PATHS

Schemas define the structure and data types of settings. Paths specify a location within a schema where settings are stored. The SCHEMA[:PATH] notation is crucial for targeting specific settings.

VALUE TYPES

gsettings supports various value types, including boolean, integer, string, arrays, and dictionaries. The VALUE argument in the set command must match the expected type of the key.

HISTORY

gsettings was introduced as part of the GNOME project's transition to dconf as its configuration backend. It replaced older configuration systems like GConf. Its development is closely tied to the evolution of GNOME and its underlying technologies. Usage has increased as GNOME and related applications have become more prevalent.

SEE ALSO

dconf(1), dconf-editor(1)

Copied to clipboard