Comment 6 for bug 1073202

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Compiz packaging branch for staging PPAs fails to set up keybindings correctly

I don't think this is just to do with staging. I can reproduce it on a stock Ubuntu 12.10 desktop now:
1. Add a new user
2. Switch to that new user
3. Open several windows
4. Press Ctrl+Alt+D
5. Press Ctrl+Super+D
Expected: Windows only hide on Ctrl+Super+D
Observed: Windows only hide on Ctrl+Alt+D

This ONLY happens for the new user until the first reboot. Thereafter it is fixed (Ctrl+Super+D works).

Now, some simple facts:
1. An Ubuntu build of Compiz contains NO mention of Ctrl+Alt+D at all. It is hardcoded to Ctrl+Super+D everywhere in compiz packages for Ubuntu.
2. When the bug occurs, the setting show-desktop in org.gnome.desktop.wm.keybinding is wrong:
    $ gsettings get org.gnome.desktop.wm.keybindings show-desktop
    ['<Primary><Alt>d', '<Primary><Super>d', '<Super>d']
But after a reboot it rights itself:
    $ gsettings get org.gnome.desktop.wm.keybindings show-desktop
    ['<Control><Primary><Super>d']

I don't believe Gnome has a hardcoded default of Ctrl+Alt+D. It looks like the offending setting comes from:
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override
    show-desktop = ['<Primary><Alt>d','<Primary><Super>d','<Super>d']
provided by package: ubuntu-settings
That's the only place on the system AFAIK that mentions Ctrl+Alt+D at all (Primary = Ctrl).

So a local fix:
1. Edit /usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override
2. Change:
    show-desktop = ['<Primary><Alt>d','<Primary><Super>d','<Super>d']
to:
    show-desktop = ['<Primary><Super>d']
3. sudo glib-compile-schemas /usr/share/glib-2.0/schemas
And now new users will not get Ctrl+Alt+D forced upon them. They will get Ctrl+Super+D instead.

A proper fix:
Make the same edit as above in package "ubuntu-settings".

Final notes:
Why is there a race or some kind of delay in the application of gsettings overrides? No idea. I still don't understand overrides. didrocks will have more of a clue.