This article introduces the Ubuntu 16.04 pycharm setting desktop shortcut startup method, and share it with everyone, as follows:
Every time you use pycharm in the ubuntu environment, you need to execute ./pycharm.sh in its installation directory to start pycharm. More troublesome, since ubuntu provides a desktop environment, we should use it separately.
All the shortcuts under Ubuntu are in:
/usr/share/applications
Unzip
Here I downloaded and unzipped pycharm to the /home/snakeson/developer folder
Here pycharm.sh is the batch execution file, and prcharm.png is the shortcut icon
Terminal opens
Use Ubuntu terminal to open:
Method one (using vim):
sudo vi /usr/share/applications/pycharm.desktop
Method two (using gedit):
sudo gedit /usr/share/applications/pycharm.desktop
Then a new box will pop up:
Post
We will paste the following content:
[ Desktop Entry]
Type=Application
Name=Pycharm
GenericName=Pycharm3
Comment=Pycharm3:The Python IDE
Exec="/home/snakeson/developer/pycharm-community-2017.2.3/bin/pycharm.sh"%f
Icon=/home/snakeson/developer/pycharm-community-2017.2.3/bin/pycharm.png
Terminal=pycharm
Categories=Pycharm;
Note that Desktop Entry must be copied in, that is, all of the above must be copied in. Here we need to replace two places: Exec=”xx” and Icon=, here we need to replace the directory where our pycharm decompressed, of course , I have replaced it, if your directory is different from mine, you have to change the path, no matter if you are pycharm2017 or pycharm2016, do not change the comment, for example, just change the two mentioned above A path will do.
Add executable permissions
sudo chmod +x /usr/share/applications/pycharm.desktop
Copy to desktop
Copy the /usr/share/applications/pycharm.desktop file to the desktop and double-click it to run.
The above is the whole content of this article, I hope it will be helpful to everyone's study.