How to add Eclipse to Favorites?
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:
[Desktop Entry] Comment=Eclipse Terminal=false Name=Eclipse Exec=/path/to/your/version/eclipse/eclipse Type=Application Icon=/path/to/your/version/eclipse/icon.xpm StartupWMClass=Eclipse
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.