---
title: "Custom Launcher for IntelliJ IDEA in Ubuntu Unity"
author: "chenzhihui"
date: "2014-04-19T11:04:20Z"
tags: ["IDEA", "Ubuntu"]
categories: ["操作系统"]
slug: "custom-launcher-for-intellij-idea-in-ubuntu-unity"
draft: false
lastmod: "2014-04-19T11:04:20Z"
id: 2049154
url: "https://weblove.iteye.com/blog/2049154"
---

IntelliJ IDEA does not install a program launcher during installation. You only get a start-up script. So you need to create a custom launcher to quickly and easily run the program without going to the terminal.

[![](http://1.bp.blogspot.com/-YQDbpHOMPYc/T8JhGOsWczI/AAAAAAAAANk/rzXY9qoArW0/s200/idea+dash.png)](http://1.bp.blogspot.com/-YQDbpHOMPYc/T8JhGOsWczI/AAAAAAAAANk/rzXY9qoArW0/s1600/idea+dash.png)

In previous versions of Ubuntu we had this to quickly create a launcher. 

[![](http://1.bp.blogspot.com/-6e_TzJLYlhM/T8JNwPUziMI/AAAAAAAAANY/PqL3QoBUm54/s320/gnome2+launcher.png)](http://1.bp.blogspot.com/-6e_TzJLYlhM/T8JNwPUziMI/AAAAAAAAANY/PqL3QoBUm54/s1600/gnome2+launcher.png)

But in Unity it is not so easy.

[]()  
For IDEA, first you have to specify the location of Java by inserting the following line in the **idea.sh** file in the **bin** directory of IDEA installation location.

[?](http://nufailm.blogspot.com/2012/05/custom-launcher-for-intellij-idea-in.html)

1

`IDEA_JDK=/usr/local/lib/java/jdk`

Next you have to create a custom launcher.

**For IntelliJ IDEA 11 or later**

If you have IntelliJ IDEA 11 or a newer version, things are pretty easy. Just run IDEA, then go to ***Tools***menu and select ***Create Desktop Entry***. A launcher will be created at `~/.local/share/applications` and you will be able to access it through the Dash. You can pin it to the launcher bar by right clicking on the icon when it's running or by drag and drop of the icon.

**For older versions**

This method can be used to create a launcher for any application, not just IntelliJ IDEA. For any launcher in Unity what you need to create is a `.desktop` file.

First create a file named `idea.desktop` in your home folder. Then open it with a text editor and add the following to it.

[?](http://nufailm.blogspot.com/2012/05/custom-launcher-for-intellij-idea-in.html)

1

2

3

4

5

6

7

8

9

`[Desktop Entry]`

`Name=IntelliJ IDEA`

`Comment=IntelliJ IDEA IDE`

`Exec=/home/nufail/apps/idea-IC-107.587/bin/idea.sh`

`Icon=/home/nufail/apps/idea-IC-107.587/bin/idea_CE128.png`

`Terminal=false`

`StartupNotify=true`

`Type=Application`

`Categories=Development;IDE;`

[nautilus-actions.org](http://www.nautilus-actions.org/?q=node%2F377) gives a good explanation about .desktop files and what all these entries mean and other entries available for .desktop files.

Now you can keep this file in the Desktop to use it as a desktop launcher or you can add it to `~/.local/share/applications` to access it through the Dash for only the current user. If you need to access it through the dash for all users, then add it to `/usr/share/applications`.