Normally, when you install regular package of KDE application, its icon shows up in KDE menu.

Now, I am making package for app which came in *.zip file, I can install it, run it, but it does not show in KDE menu. So how to register it?

openSUSE 11.4, KDE3.5.10 (!), app: IntelliJ IDEA.


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.

| improve this answer | |
  • KDE picks it up, but it has no icon, even though it's specified correctly. How can this be fixed? – jvriesem Nov 10 '16 at 17:44

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

| improve this answer | |

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. You can also 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).

| improve this answer | |

Creating the .desktop file in /usr/share/applications is correct, and I would add that it is a good idea to create a link to the idea.sh file so the .desktop file points to the link instead of the actual file.

In that manner it is easy to replace the link when a new version comes out instead of having to remember where the .desktop file is and editing it with the new path.

Here is my idea.desktop file;

[Desktop Entry]
Name=IntelliJ IDEA
GenericName=Java Editor
Comment=Develop with pleasure!
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.