Public bug reported:

This was tested in a fresh installed precise machine, with the addition
of dconf and a particular dconf configuration.

Settings set in gconf backend get overwritten when running 'dconf
update'.  This can be tested by changing any value in gconf to something
different than the default:

$ gconftool --set /desktop/gnome/sound/event_sounds --type bool false
$ gconftool --get /desktop/gnome/sound/event_sounds
false
$ gconftool --set /apps/metacity/general/focus_mode --type string sloppy
$ gconftool --get /apps/metacity/general/focus_mode
sloppy

Then editing some file under /etc/dconf and running dconf update:

$ sudo vi /etc/dconf/db/site.d/screensaver 
$ sudo dconf update
$ gconftool --get /desktop/gnome/sound/event_sounds
true
$ gconftool --get /apps/metacity/general/focus_mode
click

After talking about this with Ryan Lortie, he suggested disabling the
gnome-settings-daemon plugin:

$ gsettings set org.gnome.settings-daemon.plugins.gconf active false
$ gconftool --set /desktop/gnome/sound/event_sounds --type bool false
$ gconftool --set /apps/metacity/general/focus_mode --type string sloppy

$ sudo vi /etc/dconf/db/site.d/screensaver 
$ sudo dconf update
$ gconftool --get /desktop/gnome/sound/event_sounds
false
$ gconftool --get /apps/metacity/general/focus_mode
sloppy

It looks like the gconf plugin is overwriting all the settings with the
defaults, thus losing anything the user had customized.  It's quite
likely that a number of other bugs "Compiz loses my settings" are
actually caused by this plugin.

Also, as instructed by Ryan, I tried removing /usr/share/GConf/gsettings
/wm-schemas.convert and re-enabling the plugin, and then it doesn't
override any values that are related to the window manager but it does
override the one in the example:

$ gsettings reset org.gnome.settings-daemon.plugins.gconf active
$ gsettings get org.gnome.settings-daemon.plugins.gconf active
true
$ gconftool --set /desktop/gnome/sound/event_sounds --type bool false
$ gconftool --set /apps/metacity/general/focus_mode --type string sloppy

$ sudo vi /etc/dconf/db/site.d/screensaver 
$ sudo dconf update
$ gconftool --get /desktop/gnome/sound/event_sounds
true
$ gconftool --get /apps/metacity/general/focus_mode
sloppy

So, focus_mode didn't get overwritten while event_sounds did.

One possible solution is to remove the wm-schemas so that compiz
settings don't get lost.  A better (but probably harder) solution would
be to fix the plugin so that it doesn't overwrite what the user sets.
Maybe just remove the schemas that are being modified and stored in
gconf for Precise.

I found out that to reproduce in a fresh installed precise machine, I
had to set up some dconf files, then reboot, and then I could reproduce
consistently as explained here.  I'm attaching a bunch of dconf files.
After unpacking, you need to run dconf update once to generate the db
and then reboot.  After that it should be reproducible.

** Affects: gnome-settings-daemon (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Sample /etc/dconf configuration to reproduce the bug."
   
https://bugs.launchpad.net/bugs/1071950/+attachment/3414940/+files/etc-dconf-files.tar.gz

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-settings-daemon in Ubuntu.
https://bugs.launchpad.net/bugs/1071950

Title:
  gnome-settings-daemon dconf to gconf plugin causes settings to be lost

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1071950/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to