Ubuntu – dconf and locks

dconf

https://live.gnome.org/dconf/SystemAdministrators gives a bunch of information which just doesn't seem to apply to Ubuntu. Placing a file in:

/etc/dconf/db/local.d/locks

and running:

sudo dconf update

Creates a binary file:

/etc/dconf/db/local

And a rough look inside this file appears to take the contents of /etc/dconf/db/local.d/locks into account but for all intents and purposes, this file appears to be ignored.

Does anyone know how to apply dconf locks in Ubuntu (tried and tested preferably)?

Best Answer

dconf is based on the concept of a 'profile'. A profile is a list of configuration databases.

On startup, dconf consults the DCONF_PROFILE environment variable. If set, dconf will attempt to open the named profile, aborting if that fails. If the environment variable is not set, dconf will attempt to open the profile named "user" and if that fails, it will fall back to an internal hard-wired configuration.

In your configuration the profile is called "local". You can set the DCONF_PROFILE environment variable export by:

export DCONF_PROFILE=local 

The variable should be set before dconf started, so you can put this line for example in /etc/profile...

Related Question