How to add programs to the launcher (search)? [duplicate]

I installed eclipse juno to /usr/local/eclipse and added it to the $PATH. So I can run it from terminal simply by entering "eclipse". Now I want a launcher icon for it and it would be nice to have it in the applications when you search for it. This seems to complicated considering the tutorials I found. When I launch eclipse I can lock it to the launcher, but it will not start from there when I click the icon.

How do I get it to the launcher AND to the search?


I agree. It is complicated. You have 2 options.

  1. Install a program called 'alacarte' or 'Main Menu' from the Software Center. It will create launchers as you desire. It is the "add to launcher" program that you are looking for.

  2. You can create a .desktop file (same thing as a launcher), and place it in ~/.local/share/applications

I believe the format for a .desktop file goes something like this:

[Desktop Entry]
Type = Application
Name = name-of-application
Comment = your-desired-comment
Exec = command to execute (ex. 'eclipse')
Icon = path-to-icon

More info about .desktop files can be found here.