4

I recently installed eclipse and also created desktop entry file in

/usr/share/applications location as shown in this video Install Eclipse Luna for Java EE in Ubuntu 14.04 but it didn't work.

And also tried creating in ~/.local/share/applications/ and did what was mentioned there, but still was not able to get the eclipse launcher on the unity laucher.

My Desktop entry for eclipse is

Name=EclipseLuna
Name[en]=EclipseLuna
Comment=Integrated Developement Environment
Type=Application
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
NoDisplay=false
Categories=Development;IDE

2 Answers 2

5

You need to add

 [Desktop Entry]

as the first line to your file.

And just in case: Make sure that the file name ends with .desktop

And also make sure you have made it executable.

2
  • adding it it did work..i saved it in /usr/share/application. but which one should i give more preference to ~/.local/share/applications/ or /usr/share/application
    – ravin
    Jan 11, 2015 at 0:45
  • @ravin Use /usr/share/application if this is a multi-user system, you have root access, and all users need to have the Eclipse application shortcut. I personally prefer using my home directory, ~/, since it's easier to keep track of customization.
    – Lucas
    Jan 11, 2015 at 0:57
0

You will see eclipse only when browsing all applications, after creating .desktop file as mentioned above To pin it in unity launcher - run it and right click on it in launcher, then choose needed menu item(don`t remember how it in English ubuntu, something "favourites" may be)

my desktop file(executable) for current(one) user:

lenya@JabbaDesktop:~$ cat ./.local/share/applications/Eclipse.desktop 
[Desktop Entry]
Name=Eclipse 
Type=Application
Exec=/home/lenya/Eclipse/eclipse
Terminal=false
Icon=/home/lenya/Eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .