Get Natty Shortcuts with Lucid Stability

Posted by JD 05/11/2011 at 17:00

I like the latest Ubuntu Natty 11.04, but it doesn’t like my system. It locked up much too often to be used here. That’s too bad because I became addicted to the quick launch using keyboard shortcuts. Addicted.

So after the last crash running unity-2D, I gave up on Unity, 11.04, and started using my LXDE-based Ubuntu 10.04 again. I missed those built-in keyboard quick launchers enough to look up how to create them. It was pretty easy to add them to LXDE. I suspect it is possible to do similar settings for Gnome-based desktops, but the examples below will not work for stock gnome.

Edit the LXDE Config

~/.config/openbox/lxde-rc.xml contains the keyboard acceleration keys for LXDE. LXDE uses the OpenBox window manager, but it doesn’t use the default openbox WM configuration file. There are a bunch of keybindings already in there. Some I already knew about, like ALT-F4 to close a program and ALT-Tab to switch programs. Most of the others where unknown to me. Anyway, we’re here to add some like Meta-1, Meta-2, Meta-3 and CNTL-ALT-T to launch my terminal.

Find the Keyboard section of the file. In my file, that was around line 164. Then you just need to add the stanzas for the new shortcuts between the parts.

    <keybind key="W-1">
      <action name="execute">
        <command>firefox</command>
      </action>
    </keybind>
    <keybind key="W-2">
      <action name="execute">
        <command>thunderbird</command>
      </action>
    </keybind>
    <keybind key="W-3">
      <action name="execute">
        <command>keepassx</command>
      </action>
    </keybind>
    <keybind key="W-c">
      <action name="execute">
        <command>gcalctool</command>
      </action>
    </keybind>
    <keybind key="C-A-t">
      <action name="execute">
        <command>xterm -sb -bg black -fg yellow</command>
      </action>
    </keybind>

Obviously, you need to check the file for any collisions or you could cause multiple things to happen. You need to understand some abbreviations used in the config file.

  • C = CNTL
  • A = ALT
  • W = Meta
  • S = Shift
  • Tab = Tab key
  • Esc = Escape Key
  • F1 – F12 = numbered function keys

From the examples above, you can see that I like my terminal to have a scrollbar, black background and yellow characters too. When I tested this, everything seems to open just a little quicker than pushing the launch from my custom buttons in the menubar. Certainly, that can’t really be true.

Don’t you like having a calculator handy? I do. If spreadsheets weren’t so slow to open, I’d have that on my list too. Hummm, I own an old Windows3.1 spreadsheet, Quattro Pro. I bet it would fly, if it runs.

Don’t forget to either logout and log back in or simply right click anywhere on your desktop and select Reload Config Files to make your changes effective.

Other Key Bindings Already In There?

  1. Desktop switching using arrows and CNTL-ALT and SHIFT-ALT
  2. Change desktop using W-F1, F2, F3, ….
  3. Show desktop using W-d (iconify all programs)
  4. Move windows up or down on the screen using ALT-Esc
  5. Run a command with either ALT-F2 or W-r

Other Missing Things

Dock

Natty includes the Dock on the side. I created a side Dock for my Mother to use last fall, but I never saw the need myself. Mom likes it. The Natty dock does add some carets to denote running apps and let’s you drag the icons around easily. You can add another panel, place it on the left and add actions to it, if you like.

Dash

Under Natty, if you press and release the meta key (often marked with the MS-Windows logo), then a search/launch tool is displayed similar to Gnome-Do. In Natty, the programs and files that it finds as you type are limited to those in the normal menu. I’d prefer the results of locate. Well, the closest thing in LXDE is the ALT-F2 or W-r command. You may drop a launch tool into your top panel, if you like.

Fancy 3D Accelerated Effects

Sorry, I don’t have any more help than loading Compiz. For me, the 3D acceleration for graphics is probably the main stability issue. I’ve never tried it under Lucid. Wobbly windows aren’t worth any decreased stability to me. Sorry, not interested.

Summary

Let your imagination go. I considered making Firefox launch with W-f and Thunderbird with W-t or W-e. Then started to think about all the other programs … a calculator – W-c

Trackbacks

Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=1084