How to add Eclipse Neon launcher in GNU Linux menus and launchers

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:

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.

eclipse-in-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.

eclipse-in-the-menu

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:

6 thoughts on “How to add Eclipse Neon launcher in GNU Linux menus and launchers

  1. Back in the GNOME 2 days, one could create launchers out of the box.

    In the dark ages of GNOME 3, one have to create launchers manually…

  2. Thanks, helped me do fix my Neon launching problem with Ubuntu 16.04. If I start Eclipse and pin it to the launcher, trying to run it from the launcher causes a java exception. However starting Eclipse by a desktop file and pinning this to launcher works fine.

Leave a Reply