-   Linux - Desktop (
-   -   Custom Keybindings in Gnome - Metacity Compiz (Desktop Effect) (

notorp 04-29-2009 09:03 AM

Custom Keybindings in Gnome - Metacity Compiz (Desktop Effect)
After spending an hour or so trying to work out why my custom key bindings won't working and following a whole raft of tutorials I tracked the issue down to a once known bug between metacity and compiz.

So to create your own keybinding you can either use the gconf tool on the console or:

gconftool-2 --type=string --set /apps/metacity/global_keybindings/run_command_1 '<Alt>J'
gconftool-2 --type=string --set /apps/metacity/keybinding_commands/command_1 'joe'

much a much easier way use gconf-editor
and follow the tree to


/apps/metacity/global_keybindings and

the type the key stroke you want for say run_command1 and the program/custom script you want to execute in the matching command_1

The shortcut will work unless you've turned on desktop-effects in system > preferences > Look and Feel. This activated compiz in a minimal sort of way and by doing so compiz sits between you and metacity if you like.

The result of this is that all the gconf mods to the metacity area have no effect. Instead now you need to alter them in /apps/compiz/general/allscreens/options/ instead. This time everything is in one level but with slightly different layout in that compiz calls in run_command_key_n instead of run_command_n and these go with commandn rather than command_n.

I hope this saves someone else a lunch hour.

All times are GMT -5. The time now is 06:39 AM.