Recreating PyCharm launcher in Ubuntu

后端 未结 17 1048
一向
一向 2021-01-30 06:16

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

相关标签:
17条回答
  • 2021-01-30 07:02
    sudo vim `which charm`
    

    Now edit the RUN_PATH.

    0 讨论(0)
  • 2021-01-30 07:03

    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')
    
    0 讨论(0)
  • 2021-01-30 07:05

    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

    0 讨论(0)
  • 2021-01-30 07:09

    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
    
    0 讨论(0)
  • 2021-01-30 07:09

    In the 2016 version of PyCharm just do following:

    1. Start PyCharm.
    2. From the Tools menu, select "Create Desktop Entry..."
    3. Create entry for "all the users" if required.
    4. Relaunch PyCharm from Launcher.
    0 讨论(0)
提交回复
热议问题