您的位置:首页 > 其它

关于在Ubuntu上不能自动创建Intellij Idea快捷方式的解决办法

2014-03-26 10:56 417 查看
Custom Launcher for IntelliJ IDEA in Ubuntu Unity 

 

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. 

 

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

Next you have to create a custom launcher. 

 

 

For IntelliJ IDEA 11 

 

If you have IntelliJ IDEA 11, 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. 

 

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

成功~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐