Assign Custom Shortcut Keys in Linux Mint

  12 years ago

The problem

You want to create custom desktop shortcuts to launch favourite applications (hot-key actions) that can be later changed as you want.

A solution

Using the Gnome desktop, you can run and use the built-in Configuration Editor utility to assign custom hot-key actions.

  1. To run the application use the Alt + F2 shortcut for the Run Application dialog, type gconf-editor and click on the Run button. Another way to open the Configuration Editor is to run the command gconf-editor in the Terminal.
  2. Use the Configuration Editor to open apps > metacity > keybinding_commands by clicking on apps, then searching and clicking on metacity and finally by clicking on keybinding_commands.
  3. This application works like the registry editor (regedit) in Windows. The values on the right are the available commands that you can use to assign shortcut keys.
  4. Double-click on command_1 and enter in the full path to the executable that you are trying to run. For example, type the value /usr/bin/firefox for Firefox and click on the OK button.
  5. To add another command, double-click on command_2 and enter in the full path to another executable. For example, type the value /usr/bin/nautilus for the Nautilus file manager and click on the OK button.
  6. You may want to continue by adding more commands. To find out the right value for your favourite software, use the command which appname in the Terminal. A good example is to use which vlc to find out the value for the VLC media player. You should see the /usr/bin/vlc value.
  7. After you double-click on command_3 from the Configuration Editor, you can paste the /usr/bin/vlc value shown in the Terminl and click on the OK button.
  8. When you finish assigning the values, you need to navigate to the key global_keybindings which is directly above the keybinding_commands.
  9. Find and select run_command_1 to enter the shortcut key in plain text. It is a good idea to use the Super key (the Win key) and type <Super>F for Firefox. You can also use <Alt>F or even <Control>F if you want to, but it may conflict with other shortcuts.
  10. Find and select run_command_2 to enter <Super>N or anything you think is appropiate to open Nautilus.
  11. Find and select run_command_3 to enter <Super>V to open VLC.
  12. Now test your shortcuts and enjoy!

You should know that it is possible to 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).

Reference used: Assign Custom Shortcut Keys on Ubuntu Linux (with screenshots)

joelz 11 years ago

great, but mine says command not found. :(

Alexio 12 years ago

@orionthehunter - Thank you for the feedback! You can find other useful commands from the Linux Terminal Command Reference and from the websites recommended at the end of the tutorial.

orionthehunter 12 years ago

Nice step by step tutorial. You mention some useful commands and shortcuts that I wasn't aware of. "which" appears to be a utility that I will use in the future :-)

Alexio 12 years ago

You're welcome!

m4daredsun 12 years ago

Thanks Alexio!

efthialex 12 years ago


Elisa 12 years ago

Nice ;)