I made a shortcut for PyCharm following this instruction (created a *.desktop file; before that I launched the application via terminal by
sudo sh pycharm.sh comand). However, the shortcut I made doesn't work properly - if I launch it from Dash the application will be launched but will not work and freeze. The same will happen if I launch application via terminal by
sh pycharm.sh. But, if I launch the application via terminal with
sudo sh pycharm.sh comand, close it and then use shortcut, everything will work smoothly.
How can I make the shortcut work properly?