Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Saturday, May 14, 2016

Recreating PyCharm launcher in Ubuntu

Recreating PyCharm launcher in Ubuntu


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 Downloads folder.

I later on moved the directory to /opt/Pycharm/. This is causing the once functioning unity launcher (which was added when PyCharm was initially installed) to fail every time I attempt to use it (as expected).

How can I re-add pycharm.sh as a lauchable app from the unity launcher? I know the location of the pycharm.sh file. I've tried to add it to /usr/bin/ but that does not change anything.

I can still launch pycharm via bash /usr/opt/Pycharm/bin/Pycharm.sh. But this is tedious.

UPDATE

I have tried making a new .desktop file for pycharm, using the following script:

[Desktop Entry]  Encoding=UTF-8  Name=PyCharm  Exec=/opt/Pycharm-3.0.1/bin/pycharm.sh  Icon=/opt/Pycharm-3.0.1/bin/PyCharm_32.png  Type=Application  Categories=Development;  StartupWMClass=PyCharm  

However, I get a "Unable to save Pycharm.desktop" error when I try to save the file inside /usr/share/applications/pycharm.desktop. Any help regarding this would be deeply appreciated.

Answer by Phlip for Recreating PyCharm launcher in Ubuntu


sudo vim `which charm`  

Now edit the RUN_PATH.

Answer by Games Brainiac for Recreating PyCharm launcher in Ubuntu


All right. I managed to solve it. The thing is, Pycharm already installs a launcher inside .local/share/applications. Thus, you need to get rid of it before proceeding to create your own. After that, all you have to do is add your own *.desktop file to the applications directory inside usr/share/applications/.

You need to create your .desktop file using sudo and inside the desktop file:

[Desktop Entry]  Encoding=UTF-8  Name=PyCharm  Exec=/opt/pycharm-3.0.1/bin/pycharm.sh  Icon=/opt/pycharm-3.0.1/bin/pyCharm.png  # Changed from pycharm_32.png  Type=Application  Categories=Development;  StartupWMClass=PyCharm  

After that is done, you can launch your app properly. Please note that pycharm.sh must also have execution rights.

Answer by Shan Valleru for Recreating PyCharm launcher in Ubuntu


First start pyCharm from it's bin folder via command line

$ ./pycharm.sh

Then, goto

Tools -> Create Desktop Entry.

It will create a correct Desktop file in the correct place. Afterward you can initiate it from the menu and pin the icon or drag and drop it to the bar. This way, you don't have to deal with .desktop files and mumbo jumbo..

Answer by Kirk for Recreating PyCharm launcher in Ubuntu


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.

Answer by pzrq for Recreating PyCharm launcher in Ubuntu


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  

Answer by Gal Margalit for Recreating PyCharm launcher in Ubuntu


When Tools -> Create Desktop Entry does not work:

Create a new file on your desktop (using touch or a similar command) name:
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 ?

Answer by Magician Yang for Recreating PyCharm launcher in Ubuntu


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

Answer by Alexander Tyapkov for Recreating PyCharm launcher in Ubuntu


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 Dash.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.