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
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.