linux 创建 xxx.desktop 启动菜单图标
vim idea.desktop
[Desktop Entry]
Encoding=UTF-8
Name=idea 2021.2.2
Comment=idea 2021.2.2
Exec=/media/jf123/rj/soft-deepin/ideaIU-2021.2.2/bin/idea.sh
Icon=/media/jf123/rj/soft-deepin/ideaIU-2021.2.2/bin/idea.png
Terminal=false
starttupNotify=true
Type=Application
Categories=Application;Development;
创建软连接
install.sh
#!/bin/bash
echo "----------------------------------------------------------"
echo
ln -s /media/jf123/rj/soft-deepin/ideaIU-2021.2.2/applications/idea.desktop /usr/share/applications/idea.desktop
echo "link idea.desktop to [/usr/share/applications]"
echo "查看:"
ls -all /usr/share/applications/idea.desktop
sleep 3
echo
echo
ln -s /media/jf123/rj/soft-deepin/ideaIU-2021.2.2/applications/idea.desktop /usr/local/share/applications/idea.desktop
echo "link idea.desktop to [/usr/local/share/applications]"
echo
echo "查看:"
ls -all /usr/local/share/applications/idea.desktop
echo
echo "----------------------------------------------------------"
sleep 6
uninstall.sh
#!/bin/bash
echo "----------------------------------------------------------"
echo
rm -rf /usr/share/applications/idea.desktop
echo "rm /usr/share/applications/idea.desktop"
echo
sleep 3
echo
rm -rf /usr/local/share/applications/idea.desktop
echo "rm /usr/local/share/applications/idea.desktop"
echo
echo "----------------------------------------------------------"
sleep 6