Q: How can I fix my pycharm installation? I previously installed pycharm and could start it from the dash just write pyc... and the icon would appear. Now that I downloaded a new version of pycharm I wonder what should be done to make it replace to old one? The way I start the 4.5 pycharm is by
~/Downloads/pycharm-4.5/bin/pycharm.sh &
but I still have the old 4.0 installed and that's the one which starts if I start it from the dash. How can I fix the installation so that 4.5 is runnable from the dash?
$ 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


A: Prepare PyCharm 4.5
Move the installation:
sudo mv -r ~/Downloads/pycharm-4.5 /opt/pycharm-4.5

Create a new file in ~/.local/share/applications/
nano ~/.local/share/applications/pycharm.desktop

and add the following content
[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

If the Icon doesn't work (there is no matching icon in your icon theme), than replace the entry
Icon=pycharm

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


Remove PyCharm 4.0
In your casePyCharm 4.0 is installed in ~/Downloads/pycharm-4.0.6/. Therefore remove the folder with:
rm -r ~/Downloads/pycharm-4.0.6

Now we can search the .desktop files for PyCharm 4.0:
grep -rnw ~/.local/share/applications -e ".*pycharm.sh.*"
grep -rnw /usr/share/applications -e ".*pycharm.sh.*"

If there is an entry, like this (note the pycharm-4.0.6 in the Exec=…):
/usr/share/applications/pycharm.desktop:6:Exec=/home/<your_username>/Downloads/pycharm-4.0.6/bin/pycharm.sh

remove with:
sudo rm /usr/share/applications/pycharm.desktop


A: Answering the question, you simply need a .desktop file that contains general information about your PyCharm executable file and references to its executable.
This answer gives an example of .desktop file for PyCharm;
and This answer shows the paths for placing the .desktop file.
Have in mind, that you might want to set your Name= field to include your PyCharm's version, i.e. Name="PyCharm 4.5", since there's another version of PyCharm in your system and it might be difficult to differentiate them.

A: A simpler approach than the other answers. Rather than going through the hassle of creating the .desktop file yourself, once you load the program you can go to Tools > Create Desktop Entry. Now you can run it from the launcher. 
