30

I have Ubuntu 12.04 LTS installed on my machine. I also have installed GNOME 3. I then installed the IDE IntelliJ without issue. However I installed it to a custom location and now the only way to run it is through the terminal via "./idea.sh". I would like to create an application launcher so I can launch IntelliJ via the applications list in the GNOME 3 windows manager. How would I do such a thing via the terminal, not through a 3rd part utility. I would also prefer to have the correct icon for the launcher, not a generic one. Thank you for the help.

Marc M.
  • 3,631
  • 4
  • 32
  • 53

4 Answers4

59

Run Intellij, then go to Tools > Create Desktop Entry.

mlissner
  • 17,359
  • 18
  • 106
  • 169
  • 4
    It's perhaps the right answer for IntelliJ, however, and considering the title of the question, the chosen answer *is* the best as it is generic and it works. – Yanick Rochon Jul 01 '14 at 20:03
44

create a file called intellij.desktop in the directory /usr/share/applications/

my file looks like this

[Desktop Entry]
Name=IntelliJ IDEA Community Edition
Comment=Free Java, Groovy, Scala and Android applications development
Exec=/path/to/your/bin/idea.sh
Path=/path/to/your/bin
Terminal=false
Icon=intellij-idea-ce
Type=Application
Categories=Development;IDE

for more details check this website, http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

edit: mlissner (Thank you!) mentioned that intelliJ in particular implemented a feature to add that Icon/Launcher automatically. Just open IntelliJ IDE, go to Tools and click Create Desktop Entry...

Stefan
  • 718
  • 9
  • 13
1

On Ubuntu 20 (Focal Fossa), create a launcher with alacarte. The generated .desktop file is automatically placed in ~/.local/share/applications.

Move it from there to /usr/share/applications/ if it is to be accessible to all the computer's users.

0

You can create launcher using following steps step 1) Install gnome-panel sudo apt-get install --no-install-recommends gnome-panel

step 2) run gnome-desktop-item-edit gnome-desktop-item-edit ~/.local/share/applications --create-new

step 3) fill the required values in widget