Ubuntu22.04 LTS 创建 idea 快捷方式
首先安装了 idea 如我的安装路径为 /home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin。
1、创建快捷方式
-
lvgp@lvgp-ThinkPad-X1:~/Desktop$ touch idea.desktop
-
lvgp@lvgp-ThinkPad-X1:~/Desktop$ sudo vi idea.desktop
2、输入:
-
[Desktop Entry]
-
Name=IntelliJ IDEA
-
Comment=IntelliJ IDEA
-
Exec=/home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin/idea.sh # 换成自己的 idea 路径
-
Icon=/home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin/idea.png
-
Terminal=false
-
Type=Application
-
Categories=Developer;
-
# 只要 +x 权限就行
-
lvgp@lvgp-ThinkPad-X1:~/Desktop$ sudo chmod u+x idea.desktop
3、加入到侧边栏
将桌面的 idea.desktop 移动到 /usr/share/applicatioins 目录下, 然后在 搜索中找到 idea, 右键加入 add to favourite 即可。
-
lvgp@lvgp-ThinkPad-X1:~/Desktop$ su
-
root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# ls
-
idea.desktop
-
root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# cp idea.desktop /usr/share/applications/
-
root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# cat idea.desktop
摘抄自网络,便于检索查找。