If you are a GNU Linux user, there are of course many distributions, you have your favorite one. And there is two ways to install Eclipse IDE:
- download the installer from the new eclipse.org download page, and the select the package you want (recommanded)
- download directly an archive of your favorite package on the eclipse.org package download page
But in both case, you will have to go in the installation folder to run Eclipse. Even the installer does not create a .desktop file, so you won’t find Eclipse in your distribution menu. And depending on your distro, it might not be possible to lock Eclipse icon to the launcher. As a regular Ubuntu user, with the Unity desktop, I like to have my favorite applications in the launcher.
Create a .desktop file
The solution is actually very easy: in the installation folder, create an empty file, name it Eclipse.desktop and copy paste this code:
[Desktop Entry] Version=Neon Name=Eclipse Comment=Eclipse is an IDE Exec=/home/username/path/to/eclipse Path=/home/username/path/to/eclipse/ Icon=/home/username/path/to/eclipse/icon.xpm Terminal=false Type=Application Categories=Utility;Application;Development;
Then, change the properties of the files so it can be executed. Just double click on it, and Eclipse should start. You will be able to lock the icon to the Launcher.
Of course, please change the path to your Eclipse installation. And if you have many installations, you can change the name field to make it more clear in the menu. You can also change the filename.
Add Eclipse to your menu
You now have a cool desktop launcher, but it is not yet available in your menu. To do that, copy the Eclipse.desktop file in:
/home/username/.local/share/applications
If you still can’t find Eclipse in the menu, just log out from your session or restart your computer. That should be good.
Improve the GNU Linux installer
I opened a bug on Bugzilla, for I think that the Oomph based installer should create the .desktop. If you agree with me and want to participate to the discussion, it is here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=494735
By the way, creating a .desktop file is really a standard recommended by the Freedesktop.org. Gnome and KDE are following this standard:
- kde, https://techbase.kde.org/Development/Tutorials/Desktop_File
- gnome, https://developer.gnome.org/integration-guide/stable/desktop-files.html.en
- the reference example at freedesktop.com, https://specifications.freedesktop.org/desktop-entry-spec/latest/