【Ubuntu】如何将命令行启动的应用加入到Application?即如何将应用程序添加到启动器?

以设置IntelliJ IDEA为例。

  1. 进入/usr/share/applications目录,并新建文件idea.desktop
cd /usr/share/applications && sudo gedit idea.desktop
  1. 文件内容
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=IntelliJ IDEA
GenericName=Java IDE
Comment=IntelliJ IDEA is a code-centric IDE focused on developer    productivity. The editor deeply understands your code and knows its way around the codebase, makes great suggestions right when you need them, and is always ready to help you shape your code.
Exec=/usr/local/idea-1803/bin/idea.sh
Icon=/usr/local/idea-1803/bin/idea.png
Terminal=false
Type=Application
Categories=Development;IDE

保存之后就可以在所有应用里看到IntelliJ IDEA的应用图标了!

现在,我们就能像启动其他应用一样点击图标启动IntelliJ IDEA啦!

PS
我这里设置之后,启动IntelliJ IDEA比命令行启动慢了个7~8秒,也就是说命令行启动IntelliJ IDEA更快!
如果你设置后,两种方式启动的速度不相上下,请在评论区留个言,望不吝赐教!

猜你喜欢

转载自blog.csdn.net/AV_woaijava/article/details/108031477