Ubuntu: add shell script to Unity

I am using PhpStorm and Idea IDEs from Jetbrains.
Both these programs are started in Linux by shell script. The problem was that in Ubuntu unity, only PhpStorm was added automatically to Unity bar. I wanted also Idea icon on the bar. And I failed to added by simple “Lock to Launcher” function.

Here is simple tutorial how to do it.

1. create file idea.desktop in /usr/share/applications
2. add the following to the file:

3. find the program in search and run.
4. Right click on the Idea icon in Launcher and “Lock to Launcher”