ITeye博客

Custom Launcher for IntelliJ IDEA in Ubuntu Unity

chenzhihui · 2014-04-19 11:04 · Ubuntu/Linux · 操作系统 · Ubuntu · IDEA · Markdown

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.

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

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.

?

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

?

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。