Gsettings and dconf

Hello
I need to set a hotkey in ubuntu 12.10, I use:

gsettings(dconf)  
 gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding '<Primary><Alt>s'<br>  
 gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding '<Primary><Alt>s'<br> 
 gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ command 'gnome-terminal' 

But when I look at this schema with gsettings I just see:

gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings
@as []

But when I use dconf to see this schema:

dconf list /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/
 binding
 command

What am I doing wrong?


Use these commands:

dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/name
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/binding
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/command

First try creating custom2:

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['others', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"

(Where others is a shorthand for the other key bindings already defined. Just to be sure you don't delete them.)

Now that is out of way, configure your custom2:

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding '<Primary><Alt>s'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ command 'gnome-terminal'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ name 'Open a terminal window'