LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dconf-write

write values to dconf configuration database

TLDR

Write a key value
$ dconf write /[path/to/key] "[value]"
copy
Write a string value
$ dconf write /[path/to/key] "'[string]'"
copy
Write an integer value
$ dconf write /[path/to/key] "[5]"
copy
Write a boolean value
$ dconf write /[path/to/key] "[true]"
copy
Write an array value
$ dconf write /[path/to/key] "['first', 'second']"
copy
Write an empty array
$ dconf write /[path/to/key] "@as []"
copy

SYNOPSIS

dconf write key value

DESCRIPTION

dconf write sets a value in the dconf database. Values must be specified in GVariant text format, which requires careful quoting to satisfy both shell parsing and GVariant syntax requirements.The challenge with dconf write is the layered quoting: the shell requires quotes around the entire value argument, while GVariant format requires its own quotes for strings. This leads to constructions like "'string value'" where outer double quotes are for the shell and inner single quotes are GVariant syntax. Integers, booleans, and other types don't need the inner quotes.Changes take effect immediately for applications monitoring the dconf database. Unlike gsettings, dconf write doesn't validate values against schemas, so it's possible to write values that applications won't accept. For schema-validated writes with better error checking, use gsettings instead. dconf write is most useful in scripts where the value format is known and controlled.

PARAMETERS

key

Full path to the key
value
Value in GVariant format

VALUE FORMATS

Strings

Single quotes inside double: "'text'"
Integers
Plain numbers: "42"
Booleans
true or false
Arrays
['item1', 'item2']
Empty typed arrays
@as [] (string array), @ai [] (int array)

INSTALL

sudo apt install dconf-cli
copy
sudo dnf install dconf
copy
sudo pacman -S dconf
copy
sudo apk add dconf
copy
sudo zypper install dconf
copy
nix profile install nixpkgs#dconf
copy

CAVEATS

Quoting is tricky: shell quotes wrap GVariant format. Strings need both shell quotes and GVariant quotes. Invalid values are silently ignored. For validated writes, use gsettings.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid