After installing on kubuntu, I found that my pycharm script in ~/bin/pycharm
was just a desktop entry:
[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/snap/pycharm-community/79/bin/pycharm.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce
Obviously, I could not use this to open anything from the command line:
$ pycharm setup.py
/home/eldond/bin/pycharm_old: line 1: [Desktop: command not found
/home/eldond/bin/pycharm_old: line 4: Community: command not found
But there's a hint in the desktop entry file. Looking in /snap/pycharm-community/
, I found /snap/pycharm-community/current/bin/pycharm.sh
. I removed ~/bin/pycharm
(actually renamed it to have a backup) and then did
ln -s /snap/pycharm-community/current/bin/pycharm.sh pycharm
where again, I found the start of the path by inspecting the desktop entry script I had to start with.
Now I can open files with pycharm from the command line. I don't know what I messed up during install this time; the last two times I've done fresh installs, it's had no trouble.