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.
Create a directory named
From within the
user-db:user
system-db:local
Navigate to the
In the
#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
It is good to know that the
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.