PHPStorm launcher as terminal command on homestead
PHPStorm is a great IDE for PHP.This IDE support few major framework like Symfony, Drupal, WordPress, Zend Framework, Laravel, Magento, Joomla!, CakePHP, Yii etc.It provides the best code completion, refactorings, on-the-fly error prevention, and more.Today we know how can we access PHPStorm from our local ubuntu machine using a terminal command.First we will see how PHPStorm can access usually
Step 1: Go to https://www.jetbrains.com/phpstorm/download/#section=linux-version Step 2: Download the tar.gz of the IDE you want. For eg. PhpStorm Step 3: Extract the PhpStorm.tar.gz file in your preferred location. You can use the right click option or from the command line use: $ tar -zxvf PhpStorm.tar.gz Step 4: Now go to/PhpStorm/bin and run the phpstorm.sh file. This will create an icon in the Application list as well as run the program.
Suppose we will create a command
pstorm
and using this command we run PHPStorm.For that we need to create a direct link to executable file phpstorm.sh,just like below
sudo ln -s /opt/PhpStorm/bin/phpstorm.sh /usr/bin/pstorm
In here phpstorm.sh is your source executable file and pstorm is the assigned command name
Now we will create a launcher pstorm.desktop in this location
/usr/share/applications
,just like below
sudo gedit /usr/share/applications/pstorm.desktop
And then write the following code as below
[Desktop Entry] Version=5.0.4 Name=PhpStorm GenericName=Text Editor Exec=pstorm Terminal=false Icon=/opt/PhpStorm/bin/webide.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow [NewWindow Shortcut Group] Name=New Window Exec=pstorm TargetEnvironment=Unity
Then just save the file and restart your terminal and run
pstorm
,your PHPStorm will appear.