Start off by executing the following command:
sudo nano /usr/share/applications/YOUR-PROGRAM-NAME.desktop
Add the following to the file:
[Desktop Entry] Version=13.0 Type=Application Terminal=false Icon[en_US]=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-ICON.png Name[en_US]=PROGRAM-NAME Exec=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-NAME.sh Name=PROGRAM-NAME Icon=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-ICON.png
Change permissions and ownership of the file:
sudo chmod 644 /usr/share/applications/YOUR-PROGRAM-NAME.desktop sudo chown root:root /usr/share/applications/YOUR-PROGRAM-NAME.desktop
As an example, here is the desktop entry for Intellij:
[Desktop Entry] Version=13.0 Type=Application Terminal=false Icon[en_US]=/home/rob/.intellij-13/bin/idea.png Name[en_US]=IntelliJ Exec=/home/rob/.intellij-13/bin/idea.sh Name=IntelliJ Icon=/home/rob/.intellij-13/bin/idea.png
Change the permissions and ownership of the desktop entry for intellij:
sudo chmod 644 /usr/share/applications/intellij.desktop sudo chown root:root /usr/share/applications/intellij.desktop