Lock down specific settings

To lockdown GSettings keys in dconf, you will need to create a locks subdirectory in the keyfile directory. The files inside this directory contain a list of keys to lock. Just as with the keyfiles, you may add any number of files to this directory. Here is an example of what one might look like:

How to lock the default wallpaper

  1. First, set a default wallpaper.

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

  3. Edit /etc/dconf/db/local.d/locks/00_default-wallpaper, listing one key per line:

    # prevent changes to the company wallpaper
    /org/gnome/desktop/background/picture-uri
    /org/gnome/desktop/background/picture-options
    /org/gnome/desktop/background/primary-color
    /org/gnome/desktop/background/secondary-color
  4. Update the system databases:

            # dconf update

As of dconf 0.7.4, lockdown is only supported on a per-key basis for performance reasons; you may not yet lock entire subpaths. There are plans to address this in future releases.