Linux

Enabling Emacs Keybindings in Gnome

April 29, 2010

A while back I discovered a post on someone’s blog that talked about using Emacs key bindings in bash. Since then my efficiency in bash has gone up drastically as these key bindings are second nature to me. This is definitely one of those cases where you wish you could go back in time to tell yourself something because you discovered it much too late in life. Today I learned this can be taken a step further. If you use Gnome as your window manager you can enable it to use the emacs key bindings as well. This will work for any Gnome applications that were built using GTK.

At one point in time these bindings were enabled by default, however they were eventually disabled in the default configuration. This was supposedly for the intent of simplifying Gnome. To re-enable these key bindings hit F2 and enter gconf-editor or you can also enter it into the shell. For those not familiar with gconf, it’s similar to Windows Registry but a lot less temperamental and cluttered. Navigate to /desktop/gnome/interface/gtk_key_theme and change the entry from Default to Emacs and close gconf-editor. The change should be immediate, however some applications will pick up the change immediately. To test it out, start up Firefox and try doing a kill (c+k) and then yank (c+y), it should work just as it would within emacs.

Only registered users can comment.

  1. Yes, but how do you do this automatically so that you can run a script after you install and get this configuration setting, as well as others, without having to run several GUI based commands? That’s the point of *nix systems, no?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.