Skip to content.

plope

Personal tools
You are here: Home » Members » chrism's Home » Adding Metacity Key Bindings in Fedora
 
 

Adding Metacity Key Bindings in Fedora

I'm futzing around with a Fedora test release (Fedora is the new name for non-enterprise Red Hat Linux). Older versions of Gnome, at least in older Red Hat releases, used a different window manager that allowed you to assign arbitrary keybindings via the UI. The Fedora release, which uses Metacity as a window manager, doesn't. I get weird when I can't press Ctrl-Alt-X to bring up a new terminal window, so I figured out how to do it.

First of all, Gnome has a registry . Like the Windows registry. They say it's not like the Windows registry, but I think they're fooling themselves. Unlike Windows, each user has their very own registry. You need to edit your Gnome registry using the gconf-editor program. Here's what I did to add bindings to be able to press Ctrl-Alt-X to bring up the gnome-terminal program using 'gconf-editor':

Visit the apps/metacity/global_keybindings container and look for the "run_command_2" key. Edit the key value and type:

   <Control><Alt>X

Visit the apps/metacity/keybinding_commands container and look for the "command_2" key. Edit the key value and type:

   gnome-terminal

Or you can do this all from the command-line by typing:

  [chrism@james chrism]$ gconftool-2 -t string -s /apps/metacity/global_keybindings/run_command_3 "<Ctrl><Alt>x"
  [chrism@james chrism]$ gconftool-2 -t string -s /apps/metacity/keybinding_commands/command_3 "gnome-terminal"

Wasn't that easy?

Created by chrism
Last modified 2005-06-30 03:24 PM

RedHat -> Fedora migration..

Not really related but I consult for a small RedHat based web development/hosting shop. We can't afford to go Enterprise on all the machines so are looking at alternatives? Any opinions on if migration to Fedora will be the way to go? Or something Debian or Mandrake?

Easier Way to do it in Gnome 2.8+

Well, now it is 2005 so if anyone happens to reach this page, things have gotten easier since this tip was written.
Actually, the first stage is the same but the seconds stage can now be done via the gconf-editor. Here is the whole process:
1. Run gconf-editor
2. Go to apps/metacity/global_keybindings and add something like <Control><Alt>x to run_command_2 (or whatever is available)
3. Go to apps/metacity/keybinding_commands and add the command to execute ('gedit' for example) to command_2