KDE, KMenu and Katapult


Today’s entry in Linux Hacks involves a little issue I’ve been having in KDE. You see I sometimes need to add entries to my KMenu (the Linux/KDE equivalent to the Windows Start menu) but here’s the interesting thing. I never use my KMenu directly. Have you heard of Katapult? Me neither until my OSX obsessed buddy introduced my to some spotlight search thing on his Mac and we went a strolling looking for a Linux equivalent. Katapult is a cool way to interact with your system, it combines the Alt+F2 run dialog (also available in Windows via the WinKey+R sequence) with a Google Desktop Search allowing you to incrementally search your Run or K menu and launch whatever it has in it. The real cool thing is how it searches other areas too. If you have a huge collection of MP3 files on your desktop and you run Amarok along side Katapult then key Alt+Space and start typing the name of one of your favorite artists or songs. (Make sure it’s one that has album art downloaded and make sure your running the latest version of KDE/Katapult for the full effect!)

Anyway that’s not why I’ve summoned you here today. I wanted to explain what a pain it is to add stuff to Katapult’s catalog. Here’s the thing. Katapult scans the K Menu on start up and then live’s life believing it knows everything. Have you ever dealt with a hard headed individual where no matter how hard you try to tell them, “Bro, your fly is unzipped!” they go on to ignore you? Well that’s kinda how Katapult behaves. You add entries to your KMenu and no matter what Katapult won’t listen. I recently added an entry for GroovyConsole complete with a png of the Groovy logo. I bring up Katapult (on my system it’s mapped to the Win+R key) and type g-r-o-o-v-y and it bypasses an image of a spooky looking ghost (I have an entry for GV, what the heck is that?) and then gives up looking. Long story short, Katapult will not include any entries added to the KMenu after it starts. You have to kill Katapult and restart it to refresh it’s catalog. The first 462 times I encountered this problem I didn’t even know how to kill katapult. I mean I didn’t know its process name and I was running a version of Kubuntu that hid it’s tray icon by default.

Katapult Quick Fix
The answer ladies and gentlemen (do any ladies even read my blog?) is to include an easy way to refresh Katapult. The refresh involves two commands that must be run from the command line:
kill -9 katapult
katapult

They can be glued together on one line with a semi colon, “kill -9 katapult; katapult”. You can then add, guess what? A KMenu entry to refresh Katapult using the super-glue enabled two command sequence. I associated that with the Katapult icon and a title, “Refresh Katapult”. Then when I manually restarted Katapult I was able to find the refresh option by typing Win+R-r-e and viola! Now when I add entries to the KMenu or install apps via synaptic I can easily refresh Katapult and then locate the new app as if it ewre always there.

5 thoughts on “KDE, KMenu and Katapult

  1. Oh yeah, Ghost View. I remember now. I never use Ghost view, though I think the little ghostly icon is cool. Maybe I’ll use him to open my copy of “Groovy In Action”.

  2. There’s a better way to do this than killing katapult, and it can actually help you fix one of your other troubles, too. To bring up the context menu for katapult even when you don’t have the tray icon (for example, to turn on the tray icon in the program settings), bring up katapult (alt+space) and then hit ctrl+C.

    One strange feature, though, is that katapult re-scans the K menu whenever you bring up the settings dialog. So when you add something new to the menu, hit alt+space, ctrl+C, and then click “Configure Katapult”. You can just close the configuration dialog right away, and when you next hit alt+space, your new K menu item will show up in katapult.

  3. Jadrian,

    That does work! Unbelievable! It’s another one of those interesting little hidden nuggets that you have to accidentally find by doing something else totally unrelated and tripping over the side effect. (It’s kinda like how I discovered the Ctrl+W shortcut in Idea. I was furiously trying to close a tab in Konqueror not realizing that even though Idea’s window was tucked behind it still had focus and was stealing all of my keystrokes turning my entire source code blue.)

  4. Pingback: link

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s