Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Create Nemo Action (Shortcut) - Open In PhpStorm

Related Posts


Create a new "actions file" for nemo in your hidden local share area.

editor /home/$USER/.local/share/nemo/actions/open_in_phpstorm.nemo_action

Fill it with the following content:

[Nemo Action]

Name=Open in PhpStorm
Comment=Open the selected folder in PhpStorm
Exec=/path/to/phpstorm "%F"

You will need to update the /path/to/phpstorm to be wherever you placed the application.

Getting The Icon To Work

The PhpStorm icon will only show up if there is an icon with the name phpstorm in your current selected icons theme (whose icons can be found within /usr/share/icons). The only icon theme I had on my system that had the PhpStorm icon, was the Papirus set (install instructions), which I didn't want to use. Thus, I copied the icon from there into all of the subfolders of the ubuntu-mono-dark folder, which is the theme I do want to use. Then I force refreshed the icons. Both of these steps can be done by executing the chain of commands below (assuming you have the Papirus icon set).

sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg  /usr/share/icons/ubuntu-mono-dark/apps/16/. \
  && sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg  /usr/share/icons/ubuntu-mono-dark/apps/22/. \
  && sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg  /usr/share/icons/ubuntu-mono-dark/apps/24/. \
  && sudo cp /usr/share/icons/Papirus/16x16/apps/phpstorm.svg  /usr/share/icons/ubuntu-mono-dark/apps/48/. \
  && sudo update-icon-caches /usr/share/icons/*

IntelliJ IDEA

If you want to do the same thing with IntelliJ IDEA, then do:

editor /home/$USER/.local/share/nemo/actions/open_in_intellijidea.nemo_action
[Nemo Action]

Name=Open in IntelliJ IDEA
Comment=Open the selected folder in IntelliJ IDEA
Exec=/path/to/intellijidea "%F"


Last updated: 10th April 2024
First published: 27th July 2022