I installed pycharm normally via bin/pycharm.sh
, but the mistake I made was doing bash pycharm.sh
while the pycharm directory has inside the D
sudo vim `which charm`
Now edit the RUN_PATH
.
you can always use python for automation may be this will help you a python script that allows u to run pycharm as user or sudoers/root
import os
from time import sleep
sleep(1)
program = input('which program to run: >')
if program == "pycharm":
os.chdir('#full path to pycharm paste here')
root = input('run as root(y/n): >')
if root == 'y':
print('started ' + program + ' as root')
sleep(0.5)
print('please enter root password to continue:')
os.system('sudo ./pycharm.sh')
elif root == 'n':
print('running ' + program + ' as non root')
os.system('./pycharm.sh')
elif program != 'pycharm':
print('program not found')
Now the pycharm updated to version 2016.1 and I find the file jetbrains-pycharm.desktop
in the path ~/.local/share/applications
then just edit the path for Icon
and Exec
In case you just want to update your launcher to point to an updated PyCharm, for me changing 4.0.4 to 4.0.6 in the following worked:
nano /usr/share/applications/jetbrains-pycharm.desktop
In the 2016 version of PyCharm just do following: