1

Hopefully, not the dumbest question in the world and hopefully pertains to ubuntu stack exchange.

But when I run php storm with the command ~/Downloads/PhpStorm-181.4203.565/bin$ ./phpstorm.sh, I have to make sure to have the terminal open the entire time to use PHPStorm.

When I close the terminal phpstorm shuts down, it didn't use to do that but now I have to keep a terminal window open constantly just to run phpstorm.

Why do I have to do this?

Thanks in advance.

  • You only need to run that command ` ./phpstorm.sh` once to install it, then it should be available in your "Applications" list, you can run it by clicking on its icon. – singrium May 4 '18 at 16:29
  • 1
    @singrium That doesn't do the installation of the app launcher, that's a separate manual step you have to run within the IDE (detailed in my answer) – Thomas Ward May 4 '18 at 16:29
  • In case of PhpStorm there are better ways, but './phpstorm.sh &' will help in this case too. – Stephan Vierkant Jul 4 '18 at 19:59
2

The way processes are executed is that the Terminal window you open is running within the shell spawned by it. Every time you update PHPStorm, unless you're using customized methods of installing (or the Snap version of PHPStorm), you have to 'redo' the application launcher. Because that's not done automatically, you have to execute the script by hand until you use the in-built functions to create application launchers (see the second section of my answer).

Because you execute the script on the command line, there's a parent/child execution tree that relates to it, with the 'parent' of the chain being the terminal session. Because of the way the system handles execution trees, if you close the terminal (a parent process) it'll try to also close the child processes (unless disowned by the shell, which is not typical if you're running the script directly as you said).

Therefore your execution tree looks like this:

[Desktop Manager]
 |_ gnome-terminal
    |_ /bin/bash
       |_ [the run script for PHPStorm]
          |_ [all child processes which actually run PHPStorm, which has its own
              execution tree as well for all its processes and threads]

Killing or closing the parent gnome-terminal kills the shell running inside it, which then kills or closes the children in the chain going all the way down until the end of the tree is reached.


You probably should use PHPStorm's built in "Create Application Launcher" function, and you might have to do this every time you install a newer version or update. In most of JetBrain's IDEs, you can install the standard launcher so you don't need to use the start script by using their built-in "Create launcher" tools.

To create a launcher you can use on the command line, once the IDE is open, go to "Tools", and then click "Create Command Line Launcher".

To create a launcher for the GUI for the applications menu or the Unity dash/search, go to "Tools" and then click "Create Desktop Entry".

With the Desktop entry you won't need to open the terminal to launch PHPStorm anymore

  • Thank you @Thomas Ward, that was super easy. I really appreciate it man. – Supplement May 4 '18 at 16:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.