我下载了 clion IDE,但我看不到它作为图标,我必须通过终端运行它,如何设置它并从图标运行它?另外,如果我搜索开始菜单,我也找不到它
答案1
只需使用 snap 包即可,参见https://snapcraft.io/clion。如果您不想,则可以从快照中获取clion.desktop
和(图标)并将其用于手动安装的 CLion。clion.png
curl -s https://search.apps.ubuntu.com/api/v1/package/clion | jq -r '.download_url'
https://api.snapcraft.io/api/v1/snaps/download/6JBjLwyVchga4cOSDqhWJd9NgQfrTYam_145.snap
sudo mount 6JBjLwyVchga4cOSDqhWJd9NgQfrTYam_145.snap /mnt -t squashfs -o loop
mkdir ${HOME}/.icons
mkdir -p ${HOME}/.local/share/applications
cp /mnt/bin/clion.png $HOME/.icons/clion.png
CLION_SH=<path to clion.sh>
sed -e 's,^\(Icon=\).*,\1'"${HOME}"'/.icons/clion.png,' \
-e 's,^\(Exec=\).*,\1'"${CLION_SH}"' %f,' \
/mnt/snap/gui/clion.desktop > ${HOME}/.local/share/applications/clion.desktop
sudo umount /mnt
rm 6JBjLwyVchga4cOSDqhWJd9NgQfrTYam_145.snap