Ask Your Question

Revision history [back]

From terminal:

$ source /opt/ros/kinetic/setup.bash
$ pycharm-community

I went ahead an added source /opt/ros/kinetic/setup.bash to the bottom of ~/.bashrc.

From terminal:

$ source /opt/ros/kinetic/setup.bash
$ pycharm-community

I went ahead an and added source /opt/ros/kinetic/setup.bash to the bottom of ~/.bashrc.

From terminal:

$ source /opt/ros/kinetic/setup.bash
$ pycharm-community

I went ahead and added source /opt/ros/kinetic/setup.bash to the bottom of ~/.bashrc.


Edit: To run PyCharm via application shortcut...

  1. Find PyCharm .desktop file:
    $ locate .desktop | grep pycharm
  2. Open the PyCharm .desktop file:
    $ sudo -H gedit /PATH_TO_PYCHARM_DESKTOP_FILE/PYCHARM_DESKTOP_FILE.desktop
  3. Add bash -i -c to the Exec=... line within the desktop file.
  4. Save and exit.

Example (Ubuntu 16.04, PyCharm Community 2018.2.4):

$ locate .desktop | grep pycharm  
$ sudo -H /var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop

pycharm-community_pycharm-community.desktop

original:

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/snap/pycharm-community/85/bin/pycharm.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce

edited:

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/snap/pycharm-community/85/bin/pycharm.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop bash -i -c /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce

References:
- https://answers.ros.org/question/204326/pycharm-setup/?answer=265410#post-id-265410
- https://askubuntu.com/a/913536
- https://superuser.com/questions/202676/sudo-vs-gksudo-difference/726249#726249

From terminal:

$ source /opt/ros/kinetic/setup.bash
$ pycharm-community

I went ahead and added source /opt/ros/kinetic/setup.bash to the bottom of ~/.bashrc.


Edit: To run PyCharm via application shortcut...

  1. Find PyCharm .desktop file:
    $ locate .desktop | grep pycharm
  2. Open the PyCharm .desktop file:
    $ sudo -H gedit /PATH_TO_PYCHARM_DESKTOP_FILE/PYCHARM_DESKTOP_FILE.desktop
  3. Add bash -i -c to the Exec=... line within the desktop file.
  4. Save and exit.

Example (Ubuntu 16.04, PyCharm Community 2018.2.4):

$ locate .desktop | grep pycharm  
$ sudo -H gedit /var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop

pycharm-community_pycharm-community.desktop

original:

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/snap/pycharm-community/85/bin/pycharm.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce

edited:

[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm Community Edition
Icon=/snap/pycharm-community/85/bin/pycharm.png
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pycharm-community_pycharm-community.desktop bash -i -c /snap/bin/pycharm-community %f
Comment=Python IDE for Professional Developers
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm-ce

References:
- https://answers.ros.org/question/204326/pycharm-setup/?answer=265410#post-id-265410
- https://askubuntu.com/a/913536
- https://superuser.com/questions/202676/sudo-vs-gksudo-difference/726249#726249