Ubuntu includes a very limited shortcut key configuration utility which doesn’t allow you to assign hotkeys to your own applications or scripts. To get around this limitation, we can use the built-in gconf-editor utility to assign them ourselves.

First you’ll want to load up gconf-editor by typing it into the Alt+F2 Run dialog.

Once in the application, navigate to the following key. If you are familiar with regedit on Windows, this is very similar.

apps \ metacity \ keybinding_commands

You’ll notice a bunch of values on the right. These are the available commands that you can create for assigning to shortcut keys in the next step.

Double-click on command_1 and enter in the full path to your script or executable that you are trying to run. (Note that you can use the which command from the shell to find the path most of the time)


Now navigate to the key “global_keybindings”, which is directly above the one we were on.

Here you will want to select run_command_1. Enter in the shortcut key in plain text. For instance, for Alt+T, you’ll do <Alt>T. You could use <Ctrl>T or <Alt><Ctrl>T, or whatever you want to assign to the key.

You can also create custom commands in the keybinding_commands and assign them in the global_keybindings if you want. Just remember that the keybindings will start with run_(name of command).

Profile Photo for Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »