3

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)?

3

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...

0

The path depend on dconf used profile, AFAIK Ubuntu share same profile as Gnome (named gdm)

Check more /etc/dconf/profile/*

user-db:user
system-db:gdm

Then put user locks in folder with same name as system-db:

/etc/dconf/db/gdm.d/locks/00-my-locks

Example used from default setup:

$ cat /etc/dconf/db/gdm.d/locks/00-upstream-settings-locks 
/org/gnome/desktop/a11y/keyboard/enable
/org/gnome/desktop/background/show-desktop-icons
/org/gnome/desktop/lockdown/disable-application-handlers
/org/gnome/desktop/lockdown/disable-command-line
/org/gnome/desktop/lockdown/disable-lock-screen
/org/gnome/desktop/lockdown/disable-log-out
/org/gnome/desktop/lockdown/disable-printing
/org/gnome/desktop/lockdown/disable-print-setup
/org/gnome/desktop/lockdown/disable-save-to-disk
/org/gnome/desktop/lockdown/disable-user-switching
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.