Eclipse is a portable software, ie you just need to download and extract it to use. However, as such, we cannot start Eclipse from the menu or from the favorites bar in Ubuntu. In this article, I will guide people to add Eclipse software to the menu on Ubuntu (other portable software can do the same)
Create a .desktop file and put it in ~ / .local / share / application, this is a virtual directory to display the virtual directories in the Ubuntu directory tree, press the button with 3 dashes on the toolbar. then select Show Hidden Files (as shown below):
The content in the newly created folder looks like this:
1 2 3 4 5 6 7 8 9 10 11 | [Desktop Entry] Name=Eclipse Comment=Eclipse IDE Keywords=Eclipse;Eclipse IDE;IDE;Programing IDE TryExec=/home/trannguyenhan01092000/eclipse/eclipse Exec=/home/trannguyenhan01092000/eclipse/eclipse Terminal=false Type=Application Icon=/home/trannguyenhan01092000/eclipse/icon.xpm Categories=Utility;Application;Development; |
Inside:
Name : The name of the Shortcut Icon
TryExec : The command to run the application
Exec : The command to run the application if TryExec fails
Icon : The path to the application’s icon
Save and open the menu, you will see the Eclipse application has been added on the menu:
Ok! everything is done, to add Eclipse to the favorites bar, as normal as other applications, right click and select add favorites. With other portable applications, people do the same to add the application to the menu and favorites bar to make it easier to launch and use the application.
Reference: https://vinasupport.com/ , https://tailieu-bkhn.blogspot.com/