Recreating PyCharm launcher in Ubuntu

后端 未结 17 1047
一向
一向 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 06:56

    When Tools -> Create Desktop Entry does not work:

    Create a new file on your desktop (using vi or a similar command) named:
    jetbrains-pycharm.desktop

    Paste the following inside:

    #!/usr/bin/env xdg-open
    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=PyCharm
    Icon=/opt/pycharm-5.0.1/bin/pycharm.png
    Exec="/opt/pycharm-5.0.1/bin/pycharm.sh" %f
    Comment=Develop with pleasure!
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-pycharm
    

    Keep in mind to change the path and version number of icon and exec properties above.

    Tested on various versions of PyCharm - like a charm ☺

    0 讨论(0)
  • 2021-01-30 06:56

    Simply type this on your terminal window:

    jetbrains-pycharm.desktop 
    

    Hope that helps :)

    0 讨论(0)
  • 2021-01-30 06:56

    I just wanted to add, I just installed PyCharm Edu for Ubuntu 16.04 LTS today, and the way to create a desktop entry is very easy. When PyCharm Edu opens up, before entering any project, click on configure, and there should be a create Desktop Entry option. Select it, and it will create a PyCharm Edu.desktop file in the following directory:

    /usr/local/share/applications
    

    Now traverse to that destination, and click the newly created PyCharm Edu.desktop file to launch PyCharm Edu. After that, you would just need to lock to launcher. It should work.

    I know I am very late, but I hope I've helped those of us on Ubuntu 16.04 LTS who are trying to configure a desktop entry for this specific application.

    0 讨论(0)
  • 2021-01-30 06:59

    Simply replaced the Icon=/path/to/pycharm.pngin ~/.local/share/applications/jetbrains-pycharm-ce.desktop from meowsqueak's answer with the correct path when installed from snap.

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=PyCharm Community Edition
    Icon=/snap/pycharm-community/current/bin/pycharm.png
    Exec="/snap/bin/pycharm-community" %f
    Comment=The Drive to Develop
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-pycharm-ce
    
    0 讨论(0)
  • 2021-01-30 07:01

    I recently resolved a related issue where, after updating from v2.7 to v3.0.2, my PyCharm launcher was still pointing to the old (and now deleted) PyCharm path.
    After attempting all of the (good) advice above, the problem still persisted.
    The solution, in my case, was to create a desktop entry for ALL USERS.
    [Welcome Screen]->Configure->Create Desktop Entry...
    Check the box: "Create entry for all users" and then proceed.

    Apparently, in a previous installation I must have installed it in this fashion and was not able to update the launcher for a single account.

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

    Ubuntu 16.04 (haven't checked prior versions)

    Run pycharm.sh (make sure you use the correct dir and PyCharm version below):

    $ ./dir_where_you_placed_it/pycharm-2016.1.4/bin/pycharm.sh
    

    While PyCharm is running, right click its icon on the Launcher and select "lock to Launcher".

    0 讨论(0)
提交回复
热议问题