2

I can start, PyCharm from a shell script in a subdirectory of /opt. I get a gray question-mark icon (see attachment) rather than the orange/green PyCharm icon (see attachment). Note that the correct icon is in the PyCharm directory out-of-the-box.

I can lock this gray icon to Launcher, but this icon does not work to launch PyCharm.

How can I get a Launcher button to launch PyCharm?

(Ubuntu 14.10)

Icon on launcher PyCharm icon

0

2 Answers 2

5

Pycharm offers you to create a .desktop file on first run

When you start PyCharm for the first time, you will be offered the opportunity to set up desktop integration:

enter image description here

As you can see, you can tick: Create desktop entry (integrate in sytem menu)
This will (or would :)) create a .desktop file, jetbrains-pycharm-ce.desktop, in either /usr/share/applictions or ~/.local/share/applications, depending on if you chose For all users or not.

What if you missed the message?

If you missed the message, you can simply temporarily rename the folder:

~/.PyCharm40

...and restart PyCharm, since the absence of this folder will make PyCharm assume you run it for the first time. Then, after things are done, you can simply remove the newly created ~/.PyCharm40 folder and rename the original folder.

From then on, you can simply run Pycharm from its own launcher.

enter image description here

Note

Although the message in the window says: You can use File | Settings to configure any of these settings later, I found a lot of settings options, but not the one to create a "Desktop Entry". It looks like the method above is the only option :)

2
0

You can make a .desktop file in /usr/share/applications.

  1. Run sudo gedit /usr/share/applications/python.desktop
  2. Enter this code and edit it to match your program: [Desktop Entry] Version=1.0 Name=[choose a name] Type=Application Comment=[description] Exec=[/path/to/executable] Icon=[path/to/icon] Terminal=false
  3. Navigate to /usr/share/applications and drag the new file to your launcher.
5
  • What is the use of posting a random .desktop file? Posts on how to create a "general" launcher already exist plenty on AU Apr 16, 2015 at 13:45
  • @JacobVlijm But do people ever search? Apr 16, 2015 at 13:47
  • No, that's why the "duplicates" exist, but first we need to find out a few things to see if it is. Apr 16, 2015 at 13:48
  • It turns out the .desktop file, created by PycCharm is quite different, includes the (important) line StartupWMClass=jetbrains-pycharm-ce and desktop integration includes more than just the .desktop file. Apr 16, 2015 at 14:54
  • Of course it needs more than that. The executable is very important. Apr 16, 2015 at 17:13

Not the answer you're looking for? Browse other questions tagged .