在安装pycharm桌面的时候踩了不少的坑,最后终于找到有效的办法:
第一步:在终端输入下面命令
sudo gedit /usr/share/applications/Pycharm.desktop
第二步,配置文件:
[Desktop Entry]
Type = Application
Name = Pycharm
GenericName = Pycharm
Comment = Pycharm:The Python IDE
Exec=/home/guobaoyan/pycharm-2019.3/bin/pycharm.sh
Icon=/home/guobaoyan/pycharm-2019.3/bin/pycharm.png
Type=Application
Terminal = pycharm
Categories = Pycharm
注意:上面的Exec和lcon要使用绝对路径
第三步,修改权限
sudo chmod +x /usr/share/applications/pycharm.desktop
这样,如果在桌面上并没有出现图标,则在/usr/share/applications文件夹中搜索pycharm,复制到桌面即可