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:

11 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.

  3. Have you tried with standard Gnome and its dock? There doesn’t seem to be the context menu to add it to favorites (I created the desktop file and I can run it manually but then I cannot add it to the dock as favorite)…

  4. To me it doesn’t works this way.
    It works doing this way:

    1- creating a file eclipse.desktop in the same folder where I extracted it* was /home/USER/eclipse/java-2019-03/eclipse
    *Obs.: which I have download from here: https://www.eclipse.org/downloads/

    2- In the eclipse.desktop I use:
    [Desktop Entry]
    Encoding=UTF-8
    Exec=/home/USER/eclipse/java-2019-03/eclipse/eclipse
    Icon=/home/USER/eclipse/java-2019-03/eclipse/icon.xpm
    Type=Application
    Terminal=false
    Comment=Eclipse Integrated Development Environment
    Name=Eclipse
    GenericName=Eclipse-2019-03
    StartupNotify=false
    Categories=Development;IDE;Java;

    3- I copy the file eclipse.desktop using a terminal with the path:
    sudo cp Eclipse.desktop /usr/share/applications/

    And ok its done! Eclipse icon just appears in my menu (programming) section!

Leave a Reply