Ubuntu / Unity attach script to Launcher

There looks to be 2 ways you can do this.

Method #1: manually create .desktop file

Yes you need to create a custom .desktop launcher for it. Here are the general steps:

  1. Create *.desktop file in /usr/local/share/applications (or /usr/share/applications depending upon your system).

    $ gksudo gedit <insert-path-to-new-file.desktop>
  2. Paste below text

    [Desktop Entry]
    Name=IntelliJ IDEA

    Edit Icon= and Exec= and Name=. Also Terminal=True/false determines weather the terminal opens a window and displays output or runs in the background.

  3. Put the .desktop file into the Unity Launcher panel. For this step you'll need to navigate in a file browser to where the .desktop file is that you created in the previous steps. After locating the file, drag the file to the Unity Launcher bar on the side. After making doing this you may need to run the following command to get your system to recognize the newly added .desktop file.

    $ sudo update-desktop-database

Method #2: GUI method

Instead of manually creating the .desktop file you can summon a GUI to help assist in doing this.

  1. install gnome-panel

    $ sudo apt-get install --no-install-recommends gnome-panel
  2. launch the .desktop GUI generator

    $ gnome-desktop-item-edit ~/Desktop/ --create-new

                      ss of editor