......Security, freedom, and share......

为你的Intellij idea添加快捷方式

1.我的Intellij idea放在/home/george下。。。


    idea.sh的位置自然就是/home/george/idea-IC-123.169/bin

2. sudo gedit /usr/share/applications/intellijidea.desktop

3.输入一下内容,保存(注意Exec和Icon两项里面的目录写成你的目录哦!):

[Desktop Entry]
Name=Intellij Idea
Comment=a Java IDE
Exec=sh /home/george/idea-IC-123.169/bin/idea.sh
Icon=/home/george/idea-IC-123.169/bin/idea.png
Teminal=false
Type=Application
Categories=Application;

4.你会发现你的Dash里面有了Intellij idea的快捷方式,并且可以固定在左边的启动器里面不会失效。


5.聪明的你,也许会发现,那个所谓的.desktop文件在sudo之前不存在,sudo之后自动创建的。。。。聪明的你还会发现,这个方法使用于任何程序的快捷方式创建。。。。聪明的你要注意,Exec=后面的内容是你启动程序的脚本或者可执行程序,是脚本的话一定要用合适的命令。。。。

例如,若主程序入口是***.py,那你就写:

Exec=python /程序所在目录/***.py

就可以了。。。。。

评论
© 0nly.me | Powered by LOFTER