dconf settings are stored in a database on a per-user basis. When you run a command with sudo
, the $USER is root
, not anymore your own user. gsettings
will therefore act on the dconf database of the root
user if it exists, rather than on the dconf database of a specific user.
An in depth guide for system administrators about dconf is available on the gnome wiki. It suggests that the database on which dconf acts can be set by the DCONF_PROFILE environment variable.