· 4 Min read

KDE: pinning java programs to quick launcher [fix]

Post I ran into this bug when I was trying to add netbeans to the quick launcher in KDE. The normal method of selecting the ‘Show a launcher when not running’ option when you right click the taskbar entry will add a nonworking ‘java’ icon entry, and clicking on it does nothing. So how do you work around this? Turns out the solution is pretty simple.

  1. Open up ~/.kde/share/config/plasma-desktop-appletsrc in a suitable text editor.
  2. Find the line starting with ‘Items=’. This should be a CSV line showing all of your quick launcher items.
  3. Locate the part where it references ‘java’ in the line and replace everything before the ‘?wmClass’ with the path to /usr/share/applications/***.desktop file.
  4. Save and restart kde.
  5. You should see two icons of the app in the quick launcher, one being the original and one being your modified entry. Remove the original ‘java’ entry.
  6. Profit!