3

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'
~$ 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'

but when i watch this schema 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 i am doing wrong? Thank you.

DonSeba
  • 2,098
  • 2
  • 16
  • 25
Mike Minaev
  • 1,912
  • 4
  • 23
  • 33

1 Answers1

2

You forgot to set the value for the parent key: custom-keybindings which is of type @as[]. First check if it's empty with:

gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings

If it's empty: [] , run:

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

If it's not empty you will have to add the existing values to the above command (values must be surrounded by single quotes and separated by comma + space, like ['val1', 'val2', 'val3']). And then run:

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/custom2/ binding '<Primary><Alt>s'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/custom2/ command 'gnome-terminal'
don_crissti
  • 361
  • 1
  • 5
  • 13