How to Add a Custom Eclipse Launcher to Unity

Eclipse Unity Integration

Anyone that has worked with Eclipse on Ubuntu has undoubtedly experienced this particular annoyance.

As Eclipse isn’t really ever “installed” but just executed, it is never registered as an application on the system and so is completely absent from the menu system etc..

Odds are, if you’re reading this that you too believe that there must be a better way than creating that sloppy desktop shortcut…

The following is a simple method for creating the required *.desktop file for Eclipse’s integration with Unity.

Eclipse Unity Launcher

Assuming you have gedit, in a terminal create the file using the command:

“sudo gedit /usr/share/applications/<app-name>.desktop”

In this case I’ve used “eclipse.desktop”but the name is immaterial.

File Contents

[Desktop Entry]

Type=Application
Icon=<full path to icon>
Name=Eclipse SDK
Version=3.7.2
GenericName=Integrated Development Environment
Comment=Android Eclipse SDK
Exec=<full path to executable>
StartupNotify=true
Terminal=false
Categories=GTK;Development;IDE
MimeType=text/plain;text/x-java;application/xml;text/html;text/css;text/x-sql; (Any mime types added here can be dragged onto the launcher icon to open them)

Next, save the file and double check that it is saved in the /usr/share/applications/ folder. Launch the app and right click on it’s icon to lock it to the launcher.