Your wish is Xubuntu’s command

I remember well how a friend of mine proudly showed me that he could easily launch Internet Explorer using a special key at the top of his keyboard. Today, I know that with Xubuntu, I can use my regular keys (and cheap keyboard πŸ˜‰ ) to launch any program. Inspired by this article I decided to share this trick with you.

How it works? Simple. As you might know, a program on Linux is started when a command is executed. A command is executed e.g. when you type it in the terminal, but also when you click a menu entry in your applications menu. In Xubuntu, you can assign these commands to certain keyboard shortcuts, so that when you press the set key combination, the specified command will be executed.

Of course, in order to assign a command to a keyboard shortcut, you need to know which command you need. In order to find this, you can use Xfce’s Appfinder, which you can find in the Applications menu under Accessories.

Xfce4 Appfinder's default screen

Using the “Search:” box on top, you can find the program you need the command of. I wanted to find “Warzone 2100”, so I entered that and pressed “Enter”. It then showed up in the list. To find the command, I right-clicked Warzone 2100’s entry and selected “More Information…”:

View a program's information

As you can see, Warzone 2100’s command is, surprisingly, warzone2100.

I then fired up my keyboard settings from Applications->Settings->Keyboard Settings. On top, I selected the “Shortcuts” tab. The first time you want to add keyboard shortcuts, you need to create a new “Theme” using the left Add button. As you can see, I created the theme “Examples”, and had created the theme “Vincent” before.

Keyboard settings

Then using the right “Add” button you can assign a new command so a certain keyboard shortcut. I could’ve used Warzone 2100 here, but I used xflock4 because this command is not one you’d find with the Appfinder and I personally use it a lot. As you might guess, this command locks the screen (i.e. starts your screensaver).

Adding a command

After I clicked OK I was prompted for the command I wanted to use.

Setting a shortcut

As I like to use my left “Ctrl” key in combination with the “0” in the numpad on the right, I entered that. And that was it! I could now use that key combination to lock my screen!

The shortcut is added!

Admittedly, the “Keyboard Settings” window is not very user-friendly, and yes, the creation of themes sounds a bit useless to me to, but at least it works. You can use the same procedure to add a keyboard shortcut for all your favourite programs. For example, I used this to assign Ctrl+F12 to the command “firefox” which will, not surprisingly, open Firefox. So by combining with the Ctrl key, I already have 12 possible special keys on top of my keyboard!

In my next post I’ll show how to control your media player to skip to the next song when you press a combination of keys. Stay tuned!


10 Responses to “Your wish is Xubuntu’s command”

  1. 1 Bas 29 May 2007 at 9:32 pm

    I made Alt+F3 my favourite keyboard shortcut. What it does? It opens a terminal. πŸ˜›

    Before you ask: No, I have not yet accidentally pressed Alt+F4 instead. πŸ˜‰

  2. 2 n2j3 29 May 2007 at 10:23 pm

    Yep, opening a terminal on-the-fly is probably the main reason I had to resort to “shortcuts”. Ctrl + ~ does it for me – I find the space between ESC and ~ hard to miss (Ctrl with my left thumb , tilde with index/middle finger – comes naturally!

  3. 3 Vincent 30 May 2007 at 9:32 am

    Lol, I have assigned it to the “+” in the numpad πŸ˜‰
    However, I don’t use it that often. Perhaps that’s because that key is not that easy to press, perhaps I should also assign it to Ctrl + ~ . Ah well, I don’t reside in the terminal that often anyway, and if I do, I’ve mostly selected “Open Terminal Here” from within Thunar.

  4. 4 Free Penguin 14 June 2007 at 1:23 pm

    I’m the web-master of Free Penguin,
    I’ve seen your space and I like it, congratulations!
    If you want we could link each other with a banner o with a simple link.

    My web-site is

    I’m waiting for your reply!

    Free Penguin – Free as in Freedom

  5. 5 Vincent 14 June 2007 at 1:54 pm

    Andrea – no thanks. Your website is not related that much and if I’m honest, the quality (especially use of English) is not that high. And I’d be a bit more flattered if this was custom-written πŸ˜‰

  6. 6 Donal 4 November 2007 at 2:00 am

    Thanks for this. I’m new to linux so its great to get these shortcuts working just the way you want them.

  7. 7 Vlad 20 August 2009 at 11:11 am

    I have Xfce 4.6.0 on Xubuntu 9.04. Nothing happens when I right-click on a program in Appfinder menu.

    When I go to Keyboard Settings and choose Add in the Application Shortcuts tab, it behaves really strange and is to no avail.

    Seems that this feature has not been implemented yet in the new version of Xfce. Am I right?

  8. 8 dehwarlord 19 December 2009 at 3:00 pm

    Thanks! I assigned the Windows(Super_L) to terminal πŸ™‚

  9. 9 Dis Satisfied 15 September 2012 at 12:31 am

    Just add Windows like keyboard navigation to the menu. Much better: keyvboard shortcuts are invisible and soon forgotten.

  1. 1 Controlling your media player « Xubuntu Blog Trackback on 16 June 2007 at 10:54 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s



%d bloggers like this: