Search code examples
gnomelauncher

Creating an Application Launcher for GNOME 3 in Ubuntu


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.


Solution

  • 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...