Desktop File Example in Ubuntu 14.04

To create an icon on your desktop, you need to create a desktop file in the following format.

[Desktop Entry]
Version=1.0
Name=PhpStorm
Comment=Test the terminal running a command inside it
Exec=bash -c 'env JAVA_HOME=${HOME}/jdk /home/watcharin/phpstorm/bin/phpstorm.sh'
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=Application;

Save this file in Directory Desktop as, for example, phpstorm.desktop.

If you have trouble launching the application, change the Exec line to the following to debug.

Exec=gnome-terminal -e "bash -c 'env JAVA_HOME=${HOME}/jdk /home/watcharin/phpstorm/bin/phpstorm.sh;$SHELL'"