How to register application in KDE?

You need to create a .desktop file and place it in the right location. On my system they are placed in /usr/share/applications. The spec can be found on FreeDesktop. Copy one and call it intellij.desktop and modify accordingly. I think KDE should pick it up accordingly.


kmenuedit is a default part of the KDE distribution, and provides a GUI for editing the menu and creating desktop entries. You can start it either with kmenuedit from the terminal or right-clicking the application launcher button. In the GUI, you can copy, move, reorder, and delete menu entries, or most relevantly create a new entry by choosing File->New Item.

You can fill in a name and optional description, and provide the command to run, either from the file browser or by typing it in. The command is run within the PATH of your environment, so you can either provide a full path or just the name you'd run from the terminal. In this case you could just use intellij. You can also provide additional arguments, so to run a particular program under Wine you might use wine /path/to/program.exe.

You can also include various replacement strings as arguments to the command in the command that will be substituted for when it's run. The most commonly useful is likely '%U`, which is replaced with a list of URLs (or file paths) dragged onto the icon, but there are a few variants for different use cases.

You can select an icon by clicking the icon button at the top of the new-item window. All the default system icons are available to choose, or you can pick something from the filesystem.

In any case, save your completed entry and move it to where you want in the menu. Choose File->Save and it will update the system menu (it may take a while - there'll be a dialog telling you while it's working).


IDEA now includes the ability to create a .desktop file for itself. Tools > Create Desktop Entry...

Tags:

Kde