Como posso consertar minha instalação do pycharm?

0

Eu já instalei o pycharm e poderia iniciá-lo a partir do traço apenas escrever pyc ... e o ícone apareceria. Agora que baixei uma nova versão do pycharm, gostaria de saber o que deve ser feito para substituí-lo pelo antigo? A maneira como eu inicio o 4.5 pycharm é por

~/Downloads/pycharm-4.5/bin/pycharm.sh &

mas eu ainda tenho o antigo 4.0 instalado e é esse que começa se eu iniciá-lo a partir do traço. Como posso corrigir a instalação para que 4.5 seja executável a partir do traço?

$ sudo lsof | grep pycharm
[sudo] password for dac: 
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1002/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
pycharm.s 29590              dac  cwd       DIR              252,4       4096    1713357 /home/dac
pycharm.s 29590              dac  rtd       DIR              252,4       4096          2 /
pycharm.s 29590              dac  txt       REG              252,4     121272   12320800 /bin/dash
pycharm.s 29590              dac  mem       REG              252,4    1840928     268013 /lib/x86_64-linux-gnu/libc-2.19.so
pycharm.s 29590              dac  mem       REG              252,4     149120     268007 /lib/x86_64-linux-gnu/ld-2.19.so
pycharm.s 29590              dac    0u      CHR             136,36        0t0         39 /dev/pts/36
pycharm.s 29590              dac    1u      CHR             136,36        0t0         39 /dev/pts/36
pycharm.s 29590              dac    2u      CHR             136,36        0t0         39 /dev/pts/36
pycharm.s 29590              dac   10r      REG              252,4       6872    6029516 /home/dac/Downloads/pycharm-4.0.6/bin/pycharm.sh
java      29639              dac  mem       REG              252,4       5293    6425588 /home/dac/Downloads/pycharm-4.0.6/plugins/python-gherkin/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       1155    6425610 /home/dac/Downloads/pycharm-4.0.6/plugins/restClient/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       2124    6425560 /home/dac/Downloads/pycharm-4.0.6/plugins/htmltools/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       2178    6425623 /home/dac/Downloads/pycharm-4.0.6/plugins/stylus/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       6768    6425619 /home/dac/Downloads/pycharm-4.0.6/plugins/sass/lib/resources_en.jar
java      29639              dac  mem       REG              252,4    5184333    6425468 /home/dac/Downloads/pycharm-4.0.6/plugins/CSS/lib/css.jar
java      29639              dac  mem       REG              252,4    1567763    6425665 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/tasks-core.jar
java      29639              dac  mem       REG              252,4     389654    6425690 /home/dac/Downloads/pycharm-4.0.6/plugins/uml/lib/diagram-api.jar
java      29639              dac  mem       REG              252,4     670202    6425691 /home/dac/Downloads/pycharm-4.0.6/plugins/uml/lib/uml-support.jar
java      29639              dac  mem       REG              252,4    1602417    6425618 /home/dac/Downloads/pycharm-4.0.6/plugins/sass/lib/jrubyparser-0.5.4.jar
java      29639              dac  mem       REG              252,4       1584    6425614 /home/dac/Downloads/pycharm-4.0.6/plugins/rest/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       4158    6425577 /home/dac/Downloads/pycharm-4.0.6/plugins/less/lib/resources_en.jar
java      29639              dac  mem       REG              252,4      95612    6425570 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/java_websocket.jar
java      29639              dac  mem       REG              252,4     109043    6425568 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/commons-io-1.4.jar
java      29639              dac  mem       REG              252,4    3318083    6425567 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/batik.jar
java      29639              dac  mem       REG              252,4     373765    6425572 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/snuggletex-core-1.3-SNAPSHOT.jar
java      29639              dac  mem       REG              252,4     517073    6425573 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/xmlgraphics-commons-1.3.1.jar
java      29639              dac  mem       REG              252,4     501079    6425571 /home/dac/Downloads/pycharm-4.0.6/plugins/ipnb/lib/jeuclid-core-3.1.9.jar
java      29639              dac  mem       REG              252,4       2181    6425552 /home/dac/Downloads/pycharm-4.0.6/plugins/haml/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       7854    6425518 /home/dac/Downloads/pycharm-4.0.6/plugins/coffeescript/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       6760    6425522 /home/dac/Downloads/pycharm-4.0.6/plugins/cucumber/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       2309    6425564 /home/dac/Downloads/pycharm-4.0.6/plugins/ini4idea/lib/resources_en.jar
java      29639              dac  mem       REG              252,4       2639    6425584 /home/dac/Downloads/pycharm-4.0.6/plugins/puppet/lib/resources_en.jar
java      29639              dac  mem       REG              252,4        929    6425695 /home/dac/Downloads/pycharm-4.0.6/plugins/vagrant/lib/resources_en.jar
java      29639              dac  mem       REG              252,4    1597978    6425694 /home/dac/Downloads/pycharm-4.0.6/plugins/vagrant/lib/jrubyparser-0.5.3.jar
java      29639              dac  mem       REG              252,4       6545    6425496 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptDebugger/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     264894    6425494 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptDebugger/lib/FirefoxConnector.jar
java      29639              dac  mem       REG              252,4    2520745    6425493 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptDebugger/lib/ChromeConnector.jar
java      29639              dac  mem       REG              252,4     252004    6425506 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptLanguage/lib/ecmascript6-compiler.jar
java      29639              dac  mem       REG              252,4     194328    6425507 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptLanguage/lib/javascript-openapi.jar
java      29639              dac  mem       REG              252,4     191349    6425509 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptLanguage/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     310417    6425508 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptLanguage/lib/js-test-common.jar
java      29639              dac  mem       REG              252,4       8894    6425556 /home/dac/Downloads/pycharm-4.0.6/plugins/hg4idea/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     309687    6425661 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/jira.jar
java      29639              dac  mem       REG              252,4     113174    6425666 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/wsdl4j-1.4.jar
java      29639              dac  mem       REG              252,4      55767    6425662 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/json-path-0.8.0.jar
java      29639              dac  mem       REG              252,4      51483    6425663 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/json-smart-1.1.1.jar
java      29639              dac  mem       REG              252,4    1599570    6425657 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/axis-1.4.jar
java      29639              dac  mem       REG              252,4      31191    6425658 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/axis-jaxrpc-1.4.jar
java      29639              dac  mem       REG              252,4      76685    6425660 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/commons-discovery-0.4.jar
java      29639              dac  mem       REG              252,4      19419    6425659 /home/dac/Downloads/pycharm-4.0.6/plugins/tasks/lib/axis-saaj-1.3.jar
java      29639              dac  mem       REG              252,4      43074    6425469 /home/dac/Downloads/pycharm-4.0.6/plugins/CSS/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     262248    6425467 /home/dac/Downloads/pycharm-4.0.6/plugins/CSS/lib/css-openapi.jar
java      29639              dac  mem       REG              252,4       3662    6425537 /home/dac/Downloads/pycharm-4.0.6/plugins/fileWatcher/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     579670    6425473 /home/dac/Downloads/pycharm-4.0.6/plugins/DatabaseTools/lib/database-openapi.jar
java      29639              dac  mem       REG              252,4    2272561    6425475 /home/dac/Downloads/pycharm-4.0.6/plugins/DatabaseTools/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     214691    6425474 /home/dac/Downloads/pycharm-4.0.6/plugins/DatabaseTools/lib/jdbc-console.jar
java      29639              dac  mem       REG              252,4     250159    6425653 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/trilead.jar
java      29639              dac  mem       REG              252,4     166186    6425651 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/svnkit-javahl16.zip
java      29639              dac  mem       REG              252,4      43354    6425645 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     506530    6425654 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/trileadsrc.zip
java      29639              dac  mem       REG              252,4     164368    6425642 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/antlr.jar
java      29639              dac  mem       REG              252,4     757959    6425647 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/sqljet.jar
java      29639              dac  mem       REG              252,4       3822    6425644 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/jsch.agentproxy.svnkit-trilead-ssh2.jar
java      29639              dac  mem       REG              252,4      70637    6425646 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/sequence-library.jar
java      29639              dac  mem       REG              252,4     457368    6425648 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/sqljetsrc.zip
java      29639              dac  mem       REG              252,4    3382277    6425652 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/svnkit.jar
java      29639              dac  mem       REG              252,4     330711    6425650 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/svnkit-javahl.jar
java      29639              dac  mem       REG              252,4     252914    6425545 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/trilead-ssh2.jar
java      29639              dac  mem       REG              252,4      64455    6425540 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/git4idea-rt.jar
java      29639              dac  mem       REG              252,4      29198    6425544 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     143195    6425543 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/remote-servers-git.jar
java      29639              dac  mem       REG              252,4     105423    6425542 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/ini4j-0.5.2-patched.jar
java      29639              dac  mem       REG              252,4     248711    6425530 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/trilead-ssh2-build213.jar
java      29639              dac  mem       REG              252,4      30201    6425528 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     553833    6425527 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/javacvs-src.jar
java      29639              dac  mem       REG              252,4     101007    6425529 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/smartcvs-src.jar
java      29639              dac  mem       REG              252,4     182567    6425526 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/cvs_util.jar
java      29639              dac  mem       REG              252,4     186214    6425675 /home/dac/Downloads/pycharm-4.0.6/plugins/textmate/lib/joni.jar
java      29639              dac  mem       REG              252,4    1258043    6425674 /home/dac/Downloads/pycharm-4.0.6/plugins/textmate/lib/jcodings.jar
java      29639              dac  mem       REG              252,4       8367    6425606 /home/dac/Downloads/pycharm-4.0.6/plugins/remote-run/lib/jediterm-ssh-connector-2.0.jar
java      29639              dac  mem       REG              252,4     232908    6425669 /home/dac/Downloads/pycharm-4.0.6/plugins/terminal/lib/jediterm-pty-2.0.jar
java      29639              dac  mem       REG              252,4     432754    6425699 /home/dac/Downloads/pycharm-4.0.6/plugins/webDeployment/lib/commons-vfs2-2.1-SNAPSHOT.jar
java      29639              dac  mem       REG              252,4      33650    6425700 /home/dac/Downloads/pycharm-4.0.6/plugins/webDeployment/lib/resources_en.jar
java      29639              dac  mem       REG              252,4      59684    6425513 /home/dac/Downloads/pycharm-4.0.6/plugins/PerforceIntegration/lib/perforce_util.jar
java      29639              dac  mem       REG              252,4      12267    6425514 /home/dac/Downloads/pycharm-4.0.6/plugins/PerforceIntegration/lib/resources_en.jar
java      29639              dac  mem       REG              252,4     493911    6425536 /home/dac/Downloads/pycharm-4.0.6/plugins/fileWatcher/lib/fileWatcher.jar
java      29639              dac  mem       REG              252,4     157987    6425597 /home/dac/Downloads/pycharm-4.0.6/plugins/python-remote-interpreter/lib/python-remote-interpreter.jar
java      29639              dac  mem       REG              252,4     545696    6425576 /home/dac/Downloads/pycharm-4.0.6/plugins/less/lib/less.jar
java      29639              dac  mem       REG              252,4    2117726    6425525 /home/dac/Downloads/pycharm-4.0.6/plugins/cvsIntegration/lib/cvsIntegration.jar
java      29639              dac  mem       REG              252,4    5144371    6425649 /home/dac/Downloads/pycharm-4.0.6/plugins/svn4idea/lib/svn4idea.jar
java      29639              dac  mem       REG              252,4       8545    6425591 /home/dac/Downloads/pycharm-4.0.6/plugins/python-javascript-debugger/lib/python-javascript-debugger.jar
java      29639              dac  mem       REG              252,4    2865691    6425620 /home/dac/Downloads/pycharm-4.0.6/plugins/sass/lib/sass.jar
java      29639              dac  mem       REG              252,4      16592    6425533 /home/dac/Downloads/pycharm-4.0.6/plugins/django-db-config/lib/django-db-config.jar
java      29639              dac  mem       REG              252,4    1380871    6425583 /home/dac/Downloads/pycharm-4.0.6/plugins/puppet/lib/puppet.jar
java      29639              dac  mem       REG              252,4     881648    6425495 /home/dac/Downloads/pycharm-4.0.6/plugins/JavaScriptDebugger/lib/JavaScriptDebugger.jar
java      29639              dac  mem       REG              252,4     476810    6425607 /home/dac/Downloads/pycharm-4.0.6/plugins/remote-run/lib/remote-run.jar
java      29639              dac  mem       REG              252,4    2902960    6425541 /home/dac/Downloads/pycharm-4.0.6/plugins/git4idea/lib/git4idea.jar
java      29639              dac  mem       REG              252,4    2033724    6425512 /home/dac/Downloads/pycharm-4.0.6/plugins/PerforceIntegration/lib/PerforceIntegration.jar
java      29639              dac  mem       REG              252,4     251336    6425611 /home/dac/Downloads/pycharm-4.0.6/plugins/restClient/lib/restClient.jar
java      29639              dac  mem       REG              252,4     444150
    
por Niklas Rosencrantz 18.05.2015 / 10:40

3 respostas

2

Prepara o PyCharm 4.5

Mova a instalação:

sudo mv -r ~/Downloads/pycharm-4.5 /opt/pycharm-4.5

Crie um novo arquivo em ~/.local/share/applications/

nano ~/.local/share/applications/pycharm.desktop

e adicione o seguinte conteúdo

[Desktop Entry]
Type=Application
Name=PyCharm
Comment=The Most Intelligent Python IDE
Icon=pycharm
Exec=/opt/pycharm-4.5/bin/pycharm.sh
Terminal=false
Categories=Development;IDE;Python;
StartupWMClass=PyCharm

Se o ícone não funcionar (não há ícone correspondente no seu tema de ícones), então substitua a entrada

Icon=pycharm

com

Icon=/opt/pycharm-4.5/bin/pycharm.png

Remover o PyCharm 4.0

No seu casePyCharm 4.0 está instalado em ~/Downloads/pycharm-4.0.6/ . Portanto, remova a pasta com:

rm -r ~/Downloads/pycharm-4.0.6

Agora podemos pesquisar os arquivos .desktop do PyCharm 4.0:

grep -rnw ~/.local/share/applications -e ".*pycharm.sh.*"
grep -rnw /usr/share/applications -e ".*pycharm.sh.*"

Se houver uma entrada, como esta ( note o pycharm-4.0.6 no Exec=… ):

/usr/share/applications/pycharm.desktop:6:Exec=/home/<your_username>/Downloads/pycharm-4.0.6/bin/pycharm.sh

remova com:

sudo rm /usr/share/applications/pycharm.desktop
    
por A.B. 20.05.2015 / 18:12
1

Respondendo à pergunta, você simplesmente precisa de um arquivo .desktop que contenha informações gerais sobre o arquivo executável do PyCharm e referências a seu executável.

Esta resposta dá um exemplo do arquivo .desktop para PyCharm; e Esta resposta mostra os caminhos para colocar o .desktop arquivo.

Tenha em mente que você pode querer definir o campo Name= para incluir a versão do PyCharm, ou seja, Name="PyCharm 4.5" , já que existe outra versão do PyCharm no seu sistema e pode ser difícil diferenciá-los.

    
por Paulius Šukys 21.05.2015 / 16:13
1

Uma abordagem mais simples que as outras respostas. Em vez de passar pelo incômodo de criar o arquivo .desktop , depois de carregar o programa, você pode ir para Tools > Create Desktop Entry . Agora você pode executá-lo a partir do lançador.

    
por Stuart Robertson 12.08.2015 / 11:35