if you have the flatpak version first become the root
sudo -i
or
su
then find the pycharm.sh and run it using bash. For example, mine was like:
bash /var/lib/flatpak/app/com.jetbrains.PyCharm-Community/x86_64/stable/active/files/pycharm/bin/pycharm.sh