Buy @ Amazon

Spring Tool Suite desktop entry to launch as app from Ubuntu favourites

For any app to be launched from favourites in Ubuntu, it needs to have a ".desktop" file that can be pinned to the Ubuntu's dash as favourite. This helps in quickly launching the application at the click of a button from Ubuntu's dash in desktop.

Spring Tool Suite IDE (aka STS) for ubuntu comes as a zip file that needs to be extracted to a custom location. Inside this extracted directory you'll find a linux/ubuntu executable file by the name that goes something like SpringToolSuite4.

Every-time you want to launch STS you need to go to this directory and run this executable file to launch the IDE. Now to add this app as favourite in Ubuntu's dash for quickly launching it in future, we need to do the following:
  • Go to the root of STS directory (after copying it - the extracted zip directory - in the desired location). In my case the location is "/home/karthiks/sts-4" where "sts-4" is the name of the extracted directory.
  • Note the name of the STS executable in this directory that launches the IDE. In my case it is SpringToolSuite4.
  • Create a "sts.desktop" file in the same location of this IDE executable.
  • Open this file in your favourite text editor. I chose gedit and copy-paste the contents below and modify the values per your context. Save and close the file.
  • Right click the file > properties > permissions > Tick Allow executing file as program.
  • Double-click this file to see if it launches the STS IDE for testing purpose. All good? Go to next step.
  • Copy this "sts.desktop" file to "~/.local/share/applications/".
  • Click on "Activities" in the top-right and search for "sts". It should appear.
  • Right click on the "sts" and select "Add to Favourites" from the options menu. It should be added to the dock.
Alternatively, you can install Ubuntu's Alacarte -- an easy gnome menu editing tool, to do the above steps easily from the GUI. I too have installed this in my system to play with it in future.