Ryan Lortie desrt@desrt.ca 2012 Jeremy Bicha jbicha@ubuntu.com 2012 Jim Campbell jwcampbell@gmail.com 2012 Jana Svarova jana.svarova@gmail.com 2013 Set system-wide default values using dconf's key file directories Custom default values for system settings

System-wide default values can be set using dconf's key file directories. Key files contain groups and key-value pairs .

To demonstrate how dconf key files can be used to set default values, we'll look at how to use them to set a default wallpaper.

You don't have to use "local" as the profile name. You can even have different profiles for different users. This isn't mentioned because this functionality needs something like accountsservice integration to enforce this. gnome-control-center integration would be great too.

Set the default wallpaper

Create a directory named /etc/dconf/db/local.d/

From within the profile directory, create and edit a file named user.

user-db:user system-db:local

Navigate to the /etc/dconf/db/local.d/ directory. If this directory doesn't exist, you will need to create it.

In the local.d directory, create and edit a key file named 00_default-wallpaper.

#this portion of the key file identifies the dconf group [org/gnome/desktop/background] #these are the individual key-value pairs that are relevant to the key file group picture-uri='file:///usr/local/share/backgrounds/company-wallpaper.jpg' picture-options='scaled' primary-color='000000' secondary-color='000000'

Update the system databases

# dconf update

It is good to know that the /etc/dconf/db/site.d/ file is an alternative for site-wide settings.

The first time you create a dconf user profile, you'll need to log out and log in to apply the new profile.

You can include multiple sets of groups and key-value pairs in each key file, or you can use a separate key file for each group.

For more in-depth information, see the gnome.org website.