Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to add custom keybindings using dconf. Previously, I had do the same job using gconf and succeeded. However, there are some problems using dconf.

(I'm working on a Debian package, so file-based overrides is very easy to be packaged.)

Here is what I have:

# cat /etc/dconf/profile/user:
user-db:user
system-db:site

# cat /etc/dconf/db/site.d/keybindings
[org/mate/desktop/keybindings/emacs]
action='emacs'
binding='<Mod4>e'
name='Emacs'

[org/mate/desktop/keybindings/pluma]
action='pluma'
binding='<Mod4>g'
name='Text Editor'

[org/mate/desktop/keybindings/virtualbox]
action='virtualbox'
binding='<Mod4>v'
name='Virtual Box'

[org/mate/desktop/keybindings/rhythmbox]
action='rhythmbox'
binding='<Mod4>r'
name='Music Player'

# sudo dconf update

As you see, file /etc/dconf/db/site.d/keybindings contains 4 keybindings, however, only the first work, ie., Win+E for Emacs. Other keybindings won't work.

I can re-order the entries so that pluma be the first, or virtualbox be the first, but, the same problem again: only the first entry work. Ie., Win+G for pluma, or Win+V for virtualbox. However, I can't have all these keybindings at the same time!

But wait a minute... If I move /etc/dconf/db/site.d/keybindings to $HOME/.config/dconf/user.d/keybindings, and run:

# cd ~/.config/dconf
# mkdir user.d
# mv /etc/dconf/db/site.d/keybindings user.d/keybindings
# sudo dconf update .

then everything work! Well, because I'm writing the Debian package, I can't install files to the user's homedir, so still face the problem.

share|improve this question
    
If you already have the MateConf schemas you can port them to gsettings and use gsettings instead of dconf for site settings. I don't use mate but in Gnome 3 your /etc/dconf/db/site.d/keybindings doesn't work as it's missing the definition for the parent keybindings. Also, if I try your ~/.config/dconf/user.d thingie not a single binding works so obviously mate is quite different. HERE's my working Gnome 3 configuration along with a short explanation, see if it's of any use to you. HTH. –  don_crissti May 12 '13 at 1:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.