Ubuntu22.04 LTS 创建 idea 快捷方式

首先安装了 idea 如我的安装路径为 /home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin。

1、创建快捷方式

 
  1. lvgp@lvgp-ThinkPad-X1:~/Desktop$ touch idea.desktop
  2. lvgp@lvgp-ThinkPad-X1:~/Desktop$ sudo vi idea.desktop
 

2、输入:

 
  1. [Desktop Entry]
  2. Name=IntelliJ IDEA
  3. Comment=IntelliJ IDEA
  4. Exec=/home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin/idea.sh # 换成自己的 idea 路径
  5. Icon=/home/lvgp/software/0-development/1-developTools/0-ideaIU-2022.1.3/idea-IU-221.5921.22/bin/idea.png
  6. Terminal=false
  7. Type=Application
  8. Categories=Developer;
 
 
  1. # 只要 +x 权限就行
  2. lvgp@lvgp-ThinkPad-X1:~/Desktop$ sudo chmod u+x idea.desktop
 

3、加入到侧边栏
将桌面的 idea.desktop 移动到 /usr/share/applicatioins 目录下, 然后在 搜索中找到 idea, 右键加入 add to favourite 即可。

 
  1. lvgp@lvgp-ThinkPad-X1:~/Desktop$ su
  2. root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# ls
  3. idea.desktop
  4. root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# cp idea.desktop /usr/share/applications/
  5. root@lvgp-ThinkPad-X1:/home/lvgp/Desktop# cat idea.desktop
 

 

posted @ 2024-07-01 11:08  CharyGao  阅读(74)  评论(0编辑  收藏  举报