Sunday 15 December 2013

Adding New short cut to Ubuntu 12.04 Launcher

Adding a new shortcut to ubuntu luncher is easy. I added launcher to SpringToolSuit with following steps. Final output will be as shown in the following image.

add a new file to /usr/share/applications/STS.desktop

Enter the following command in terminal


sudo gedit /usr/share/applications/STS.desktop



Remember to use the '.desktop' with file name and add the follwowing script.

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=STS 3.0.0
Version=1.0
Type=Application
Terminal=false
Exec=/opt/custom/STS_new/sts-3.0.0.RELEASE/STS    #this is path to your launcher
Icon=/opt/custom/STS_new/sts-3.0.0.RELEASE/icon.xpm # this is the icon for the launcher.
Actions=New;
[Desktop Action New]

# Adding new instance functionality add the following lines.
Name=New Instance
Exec=/opt/custom/STS_new/sts-3.0.0.RELEASE/STS &

Now click on dash home and type STS and you will see the icon. Click on it to launche the application. Once the application starts. Right click on the icon and click "Lock to Launcher". Now you can start the application by clicking on the icon.