Undetectable Humanizer: Lifetime Subscription
Transform AI-Generated Text into Human-Like, High-Ranking Content & Bypass Even the Most Sophisticated AI Detectors
Get 95% Deal

Create custom desktop shortcuts in Ubuntu

Jack Wallen
Aug 8, 2009
Updated • Feb 13, 2018
Linux
|
5

Do you need your operating system to be as efficient as possible? Do you hate having to go back and forth between the mouse and the keyboard? Would you rather have a keyboard shortcut for everything?

If this is you then you are in luck. Linux desktops tend to be the most configurable of all the desktops. And among the many configuration options is the keyboard shortcut. With this you can create shortcuts to get creative with starting applications.

In this article I am going to show you how to set custom keyboard shortcuts in GNOME and then show how you can get creative with them. The GNOME release I am using is 2.26.1 and the Ubuntu release is 9.04.

Creating shortcuts

Figure 1
Figure 1

Creating shortcuts in GNOME is quite simple. You will notice in the Preferences sub-menu of the System menu there is an entry for Keyboard Shortcuts. Click on that to open up the Keyboard Shortcuts manager (see Figure 1). As you can see there are a number of keyboard shortcuts already created for you. This is not only a good place to create new

Figure 2
Figure 2

shortcuts but to find out what shortcuts are already enabled on the system. You might even find some of the keyboard shortcuts you want to use are disabled by default. You can enable them and give them new shortcuts. For example, the Expo key (which displays all desktops side by side - see Figure 2) is listed with the Mod4+E shortcut. What is the Mod4 key? It's the Window's key which is usually referred to as the "Super" key. So I reassigned that shortcut to work properly.

Add a new shortcut

Now it's time to see just how shortcuts are created. As I mentioned earlier, creating shortcuts really is quite simple.

Figure 3
Figure 3

Once you have the Keyboard Shortcuts window open you will see the Add key at the bottom of the window. If you click on that a new, small window will open (see Figure 3). In this new window you only need to add two pieces of information:

Name: This is the name of the shortcut.

Command: This is the command you want to run when you hit the keyboard shortcut.

Figure 4
Figure 4

After you fill out this information click Apply and you will see the shortcut is listed as disabled (see Figure 4). The reason the shortcut is listed as disabled is because an actual shortcut has yet to be defined. Now we have to define the shortcut. To do this click on the Disabled section associated with your shortcut. In figure 4 I have created a shortcut to open up the Claws Mail email client. Now I want to assign the shortcut combination of the Alt Key + "c" to start the application. To do this I will click on the "Disabled" entry which will change and say "New shortcut...". When you see this change hit the keyboard combination you want to use and it will then be assigned. You know it worked if the shortcut is now listed in conjunction with new shortcut.

Be creative

Don't think you just have to be limited to opening up standard applications with this feature. For example: I use the Nano editor a LOT. But to use the Nano editor I have to open up a console window and then enter the nano command to start up the editor. Instead I create a shortcut that will automatically open up the gnome-terminal with the Nano editor running. To do this I will create a shortcut with the following information:

Name: Nano

Command: gnome-terminal -e nano

Assign this the Ctrl-N combination and when you hit that keyboard shortcut you will have the gnome-terminal console opened immediately to the Nano editor.

You can also, for example, open a browser window to a specific site. Say, for instance, you want to have one keyboard shortcut to open Firefox to ghacks.net and one shortcut to open Firefox to Slashdot. You can do this by adding shortcuts with the following information:

For Ghacks

Name: Firefox Ghacks

Command: firefox https://www.ghacks.net

For Slashdot

Name: Firefox Slashdot

Command: firefox http://www.slashdot.org

Final thoughts

Creating keyboard shortcuts can make your desktop life so much easier. Have you used creative shortcuts to make your desktop life easier? If so, share them.

Summary
Create custom desktop shortcuts in Ubuntu
Article Name
Create custom desktop shortcuts in Ubuntu
Description
Do you need your operating system to be as efficient as possible? Do you hate having to go back and forth between the mouse and the keyboard? Would you rather have a keyboard shortcut for everything?
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. hamen said on October 7, 2009 at 1:13 pm
    Reply

    Hi,
    is there a way to do this with Hardy? In the Keyboard Shortcuts window open, Hardy have no “Add key” button.
    http://www.yoimg.com/h/3f8efcb272fcaa9260ad717454199953-keyboardshortcuts.png.html
    Thanks.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.