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

Jacob Vlijm
  • 85,475
Jantomedes
  • 83
  • 1
  • 9

1 Answers1

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
    
Jacob Vlijm
  • 85,475