1

I've downloaded Eclipse and I want it to be on my fast-launching dash bar but the problem is that, as you all probably know, Eclipse does not install but is inside a normal archive.

So I tried to make my own .desktop file and placed it in ~/.local/share/applications but it didn't change anything.

So I downloaded alacarte and tried to add a menu element but every time I hit the "OK" button nothing happened (there wasn't anything new on the alacarte list, of course nor on the dash bar).

So what should I do and why nothing I've been doing seemed to work?

Mine .desktop file: [Desktop Entry] Name=Eclipse\ Java Comment=Eclipse\ Luna\ do\ pracy\ przy\ Javie Exec=./~/home/jantek/Instalki/Eclipse\ Java/eclipse/eclipse Icon=./~/home/jantek/Instalki/Eclipse\ Java/eclipse/icon.xpm Terminal=false Type=Application StartupNotify=true And the alacartes one: [Desktop Entry] Comment=Eclipse Luna dla Javy Terminal=false Name=Eclipse Java Exec=/home/jantek/Instalki/Eclipse Java/eclipse/eclipse Type=Application Icon=/home/jantek/Instalki/Eclipse Java/eclipse/icon

  • could you add the content of your home-made .desktop file and / or the alacarte-made one? Alacarte removes possible icon extensions in the .desktop file for one thing. – Jacob Vlijm Sep 27 '14 at 18:30
  • Okey, I added that. – Jantomedes Sep 27 '14 at 18:34
1

Issues with the desktop file

Taking the alacarte-made desktop file as a starting point (the other one has more issues), there are two lines which are almost certainly critical, and causing your desktop file to be refused by Dash and the Launcher:

  • The Exec= line:

    Exec=/home/jantek/Instalki/Eclipse Java/eclipse/eclipse
    

    What you are actually trying to do here is to open a file Java/eclipse/eclipse with an executable called Eclipse, located in /home/jantek/Instalki:

    Exec=<application> <file>
    

    That is probably not what you intended. Instead of the application (eclipse), you are referring to what seems to be a directory (Exec=/home/jantek/Instalki/Eclipse).

    Assuming the executable eclipse (lowercase) is in the folder .../Eclipse (looking at your Icon= line, but check it), your Exec= line simply should be like:

    Exec=/home/jantek/Instalki/Eclipse/eclipse
    
  • The Icon= line:

    Like I mentioned in my comment, Alacarte removes the file extension of any icon you define. Apart from that, just like in the Exec= line, the path you are defining is incorrect (why the space?). Your Icon= line should look like:

    Icon=/home/jantek/Instalki/Eclipse/icon.xpm
    

    But again, check if the paths to both the eclipse executable and the icon are correct.

If you fix these two lines, your .desktop file should work fine.

Note:

If the path to your executable or your icon includes foldernames with spaces:

  • If it is in the Exec= line, put either the whole part after Exec= in quotes:

    Exec="/long/path/to/executable/folder with spaces/eclipse"
    

    or just the folder with spaces:

    Exec=/long/path/to/executable/"folder with spaces"/eclipse
    
  • In the Icon= line, a folder with a space should be fine:

    Icon=/long/path/to/executable/folder with spaces/icon.xpm
    
| improve this answer | |
  • The space is because the folder is called "Eclipse Java". I think I'll just change the space to '_'. – Jantomedes Sep 28 '14 at 9:38
  • @Jantomedes sorry, I was just editing my answer, I saw you were too, what was the edit? I added information about how to habdle folders with spaces. – Jacob Vlijm Sep 28 '14 at 10:11
  • Correcting the typo - you wrote "Exec=..." instead "Icon=..." when talking about the icon. – Jantomedes Sep 28 '14 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.