-   Ubuntu (
-   -   Keyboard shortcuts to run commands in GNOME (

Xzyx987X 12-12-2006 11:59 AM

Keyboard shortcuts to run commands in GNOME
GNOME's default selection of keyboard shortcuts is woefully inadequate, so is there a way to set up shorcuts in GNOME that launch arbitrary commands?

blackdragonblood 12-12-2006 08:33 PM

Are you looking for something like System---> Preferences --->Keyboard Shortcuts?

fragos 12-12-2006 09:47 PM

The answer is yes you can assign more keyboard shortcuts than offered in the Gnome GUI. A while back I read a post which told me how to assign Crtl-Alt-Del to the System Monitor. It worked even after my upgrade from Dapper to Edgy. I remember having to go to the command line for it but can't remember what I did. Perhaps a little Google on Crtl-Alt-Del, Ubuntu and System Monitor will help you locate the post.

Xzyx987X 12-13-2006 12:23 AM

Ah, thanks for putting me on the right track, I believe I found it: Although acually I wanted to use this to add a key shortcut to switch users, the information I found there is still applicable. For anyone else who wants to know, the configuration path of "/apps/metacity/global_keybindings/" is used to hold keybindings for metacity and the path "/apps/metacity/keybinding_commands/" is used to hold definitions of the commands you can bind. I belive only the ones matching the pattern command_N (bound using run_command_N) are supposed to be configurable though. Also, you may want to use gconf-editor as it gives you a useful description of what all the stuff in your GNOME configuartion does.

Anyway, this should work nicely for my purposes. I'm suprised no one knew about this right off the bat though, as I'd think wanting to use keyboard shortcuts to launch commands would be desirable for a lot of users. One thing though, if anyone knows of a way to do this that will work with any window manager, and not just metacity, that would be even better. I'm not using beryl now, as it has quite a few bugs I find annoying, but I'm sure at some point in the future I'll want to use it and I don't want to have to lose my keyboard shortcuts in the process.

Xzyx987X 12-13-2006 12:50 AM

Damn, guess this won't work after all. I tried associating <Super_L> + l with gdmflexiserver (the command used for ubuntu's "New Login" shortcut) but there were two problems. The first was rather minor; metacity doesn't appear to support Super keys as modifiers. I decided to go with <Ctrl><Alt>Home instead, which works, although it'd be nice to have the same shortcut I got used to in Windows. And there is also the second problem, that being when I log back in I'm greeted by no less than 109 gmflexiserver windows asking me to select a dislay to open or open a new one. Although I can close them and continue as normal, it takes too long and is way too annoying to put up with. Does anyone know if there's a solution to either of these problems?

fragos 12-13-2006 02:32 AM

The Super/Windows key annoyed me as well. I looked at the xml files that got created and notice the command to associate the terminal with Ctrl-Shift-t. That function is settable with the GUI. Perhaps this command line function is the basis of the GUI. The GUI therefore can be expanded for more app key bindings. I used to be a SuSE KDE user and KDE had the ability to do what you want as part of the file associations GUI. I do however prefer Gnome for my use. Perhaps Beryl will also have it's own way of setting key bindings. It would appear that key bindings are relagated to the window manager in Linux.

All times are GMT -5. The time now is 04:23 AM.