📜 ⬆️ ⬇️

Running PhpStorm from Unity Luncher / Dasha is not that easy

Faced a problem here: PhpStorm - a wonderful IDE from JetBrains - was not fixed in the Unity lancher, or rather fixed, but after closing, pressing the icon didn’t lead to anything except a small buzzing screw. Having a little rummaged, I understood that the problem is that I run /opt/PhpStorm/bin/PhpStorm.sh, and I try to fix it with Java. Googling, I found the specification of .desktop files used to run in the lancher and created the file /usr/share/applications/phpstorm.desktop
[Desktop Entry] Type=Application Version=1.0 Name=PhpStorm GenericName=PHP IDE Comment=Lightweight and Smart PHP IDE Icon=/opt/PhpStorm/bin/webide.png Exec=/opt/PhpStorm/bin/PhpStorm.sh Categories=Development;IDE; 

I found it in the dash, in the “Development” category, dragged it to a luncher, launched it and voila - PhpStorm runs.

But starting to work , switching to the browser, checking the site and tapping the second from the top icon, where I dragged the site, I suddenly saw that the second copy of the IDE was running, and the PhpStorm icon was split in two. That is to be started it is started, Still googling, I found that the reason is the same - one file is started and running another (java ...), it completes itself, but Unity does not notice this. To bypass such situations, a parameter is provided in .desktop
StartupWMClass, but for some reason it did not work.

Googling yet, found on JetBrains bugtracker four such problems for their other products on the same engine ( one , two , three , four ). Judging by the comments to the first three, the guys from JetBrains, it seems, solve the problem, alas, they do not consider it necessary and recommend using a workaround , which I never earned :( Perhaps because xprop | grep WM_CLASS gives me WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "java-lang-Thread" , and in the source of the agent you can see the string "sun / awt / X11 / XToolkit", maybe it matters, maybe not, but there is no more to deal with Java ... In general, I scored on a lancher, since at least PhpStorm appeared in the dash and started up from there normally. The main thing is not to attach it to the lancher or remember that icons are duplicated.

')

Source: https://habr.com/ru/post/125815/


All Articles