To change the value of several dconf keys

Desktop Settings Storage

This chapter describes how are your MATE desktop settings stored, and how to retrieve or modify them using the dconf or gsettings command line tools, or the Dconf Editor GUI application.

Introduction

The settings of your MATE desktop are managed and stored by dconf, which is a key-based configuration system for hardware and software configurations.

dconf uses several database files in GVDB binary format, one database per file. A dconf profile consists of a single file, in plain text format, which contains a list of database files in GVDB format. All dconf profiles are stored in the /etc/dconf/profile folder.

In most systems, there is no dconf profile file since they only use the default database, user.db which is stored in ~/.config/dconf/user. In such case, there is no system-wide setting, i.e. users just have their own settings.

Example of content for the user profile (/etc/dconf/profile/user file):

user-db: user
system-db: local
system-db: site
system-db: distro

The previous dconf profile contains 4 GVDB files, one per line.

Each one of these databases store key-value pairs using a hash map data structure, which can map string keys to GVariant values in a way that is extremely efficient for lookups. The lookup preference is determined by the order of appearance in the dconf profile file, user's databases have the highest preference in the previous dconf profile example. The keys from multiple configuration sources coexist in a logical tree structure. MATE Desktop key-value hashmap entries are under the /org/mate logical node, which are usually stored in user's databases.

Refer to the dconf(7) for more information about the dconf configuration system.

To read the value of a dconf key

The value of a dconf key can be read using the dconf or gsettings command line tools, or the Dconf Editor GUI application.

This section shows how to read the background picture of your MATE desktop, this values is stored in the dconf key:

The following figure displays the full path to this dconf key. Note that the other directories have not been expanded, or they have been removed, and only are showed the keys for dconf directory:

 Figure showing the contents of /org/mate/desktop/background/ dconf directory.

You can read the value of a dconf key:

Using the dconf-editor GUI application

To show the value of a dconf key using the Dconf Editor application, perform the following steps:

  1. Choose Applications > System Tools > dconf Editor from the top panel.

  2. Click on the folders to get the full path to the dconf directory.

 Dconf-Editor showing the value of /org/mate/desktop/background/picture-filename key

Using the dconf command line tool

To read the value of a dconf key using the dconf command line tool, run the following command:

$ dconf read /org/mate/desktop/background/picture-filename
'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Dark.png'

Synopsis:

dconf read [-d] KEY

Refer to the dconf(1) for more information on how to use dconf command line tool.

You can use the Tab key to auto complete the path to the dconf key.

Using the gsettings command line tool

To read the value of a dconf key using the gsettings command line tool, run the following command:

$ gsettings get org.mate.background picture-filename
'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Dark.png'

Synopsis:

gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Refer to the gsettings(1) for more information on how to use gsettings command line tool.

To change the value of a dconf key

The value of a dconf key can be modified using the dconf command or the Dconf Editor application.

This section shows how to change the background picture of your MATE desktop, this values is stored in the dconf key:

The following figure displays the full path to this dconf key. Note that the other directories have not been expanded, or they have been removed, and only are showed the keys for dconf directory:

 Figure showing the contents of /org/mate/desktop/background/ dconf directory.

You can mofify the value of a dconf key:

Using the dconf-editor GUI application

To edit the background picture of your MATE desktop in Dconf Editor, perform the following steps:

  1. Choose Applications > System Tools > dconf Editor from the top panel.

  2. Click on the folders to get the full path to the dconf directory, and then click on the dconf key to edit its value.

  3. Enter the new value in Custom value text box.

  4. Click on the Check mark button to apply the change.

 Editing the value of /org/mate/desktop/background/picture-filename key in Dconf-Editor dialog

Using the dconf command line tool

To change the background picture of your MATE desktop, run the following command:

$ dconf write /org/mate/desktop/background/picture-filename \
"'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light.png'"

Synopsis:

dconf write KEY VALUE

Refer to the dconf(1) for more information on how to use dconf.

Using the gsettings command line tool

To change the background picture of your MATE desktop, run the following command:

$ gsettings set org.mate.background picture-filename \
"'/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light.png'"

Synopsis:

gsettings [--schemadir SCHEMADIR] set SCHEMA[:PATH] KEY VALUE

Refer to the gsettings(1) for more information on how to use dconf.

To change the value of several dconf keys

To change the value of several dconf keys at the same time, perform the following steps:

  1. Dump the contents of a dconf directory to a new plain text file:

    $ dconf dump /org/mate/desktop/background/ > file.dconf
  2. Make changes in the plain text file

    [/]
    color-shading-type='vertical-gradient'
    primary-color='rgb(88,145,188)'
    picture-options='zoom'
    picture-filename='/usr/share/backgrounds/mate/desktop/MATE-Stripes-Light.png'
    secondary-color='rgb(60,143,37)'
  3. Load the contents of the plain text file to a dconf directory

    $ dconf load /org/mate/desktop/background/ < file.dconf

You can also dump/load several directories at once, e.g. to back up and restore all configurations of your MATE desktop:

$ dconf dump /org/mate/ > backup.dconf
$ dconf load /org/mate/ < backup.dconf

Refer to the dconf(1) for more information on how to use dconf command line tool.

Back to Main Page