I installed the latest version of Eclipse onto Ubuntu 18.04 with the official installer from the Eclipse website, however I can't get it to appear on my favorites bar/dock.
I have tried dragging the executable file to the dock, but it doesn't work.
I can't find it with the "show applications" button. I can only run it by clicking on its executable file.
How can I get Eclipse to appear on the favorites bar/dock?
The .desktop file:
[Desktop Entry]
Comment=Eclipse
Terminal=false
Name=Eclipse
Exec=eclipse --profile-directory=/home/myName/eclipse/java-2018-09/eclipse
Type=Application
Icon=eclipse
This isn't a duplicate of this question because the same process doesn't work. Changing the text file to an executable doesn't work.
I merged this answer, OP's answer, below comments and my own experience:
Create a file called
Eclipse.desktop
in~/.local/share/applications
(e.g. with the commandnano ~/.local/share/applications/Eclipse.desktop
)Add these lines:
Note that 'Exec' should point to your eclipse executable, not the containing folder which is also named 'eclipse' usually. Check if the icon file is present and if necessary adapt its path. Save the file.
Make the file executable by running
chmod a+x ~/.local/share/applications/Eclipse.desktop
.Click on 'Show Applications' (the dot logo on the bottom left of the screen) and in the search bar enter 'Eclipse'. It should appear.
Right click on the Icon and choose 'Add to favorites'.
There is a lot more you can specify in a .desktop file with further key-value pairs, more info here.
First the problem with the
.desktop
launcher was fixed by changing theExec
line toThen "added to favorites" following this.