gsettings does not respect dconf locks

Bug #1122028 reported by Jake Allen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu 12.04.1 LTS
Release: 12.04

libglib2.0-bin:
  Installed: 2.32.3-0ubuntu1
  Candidate: 2.32.3-0ubuntu1

gsettings does not respect locked dconf values (although it does know that they are not writable).

Steps to reproduce:
1. Lock the value of /org/gnome/desktop/session/idle-delay by setuping up dconf
as outlined at https://live.gnome.org/dconf/SystemAdministrators, specifically

$ mkdir -p /etc/dconf/profile
$ mkdir -p /etc/dconf/db/local.d
$ mkdir -p /etc/dconf/db/site.d/locks

$ cat /etc/dconf/profiles/user
user-db:user
system-db:local
system-db:site

$ cat /etc/dconf/db/site.d/screensaver
[org/gnome/desktop/session]
idle-delay=10

$ cat /etc/dconf/db/site.d/locks/screensaver
/org/gnome/desktop/session/idle-delay

2. Run `dconf update` to updates these changes.

3. Run `dconf read /org/gnome/desktop/session/idle-delay` and observe the value is '10'.

4. Run `gsettings get org.gnome.desktop.session idle-delay` and observe the value is the default value 'uint32 600'

Expected results:
dconf and gsettings would return the same value.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Margarita Manterola (marga-9) wrote :

This bug was also reported in GNOME's bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=693149

Let me add that if the locks are removed from the /etc/dconf files, and then the user changes the value manually, for example to 3 minutes, then this is the result:

$ dconf read /org/gnome/desktop/session/idle-delay
uint32 180
$ gsettings get org.gnome.desktop.session idle-delay
uint32 180

But if the locks are then restored (by editing the files and then running dconf update):

$ dconf read /org/gnome/desktop/session/idle-delay
10
$ gsettings get org.gnome.desktop.session idle-delay
uint32 600

Revision history for this message
Margarita Manterola (marga-9) wrote :

On the other bug, Ryan Lortie explained that this is because the value needs to be casted to uint32.

Changing:
idle-delay=10
To:
idle-delay=uint32 10

Makes this work correctly.

I still think this is a bug though, since it's a conf file, not a programming language. But in any case it should be documented somewhere... Where?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.