I use a tool called Quiet.exe
for this (found on Source [1]), have not managed to find a solution without it unfortunately
- Install X410 or other Windows X servers, put startup code into
/home/username/scripts/displayvar.sh
(file content in my case for X410:export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
) - Install Phpstorm using Jetbrains toolbox, use option "Shell Scripts" -> "Generate shell scripts" ("Shell scripts location" in my case is
/opt/shortcuts
)- Starting phpstorm using
/opt/shortcuts/phpstorm
from inside WSL2 terminal will work now.. one could always start from here using the command/opt/shortcuts/phpstorm &
- Starting phpstorm using
- Allow starting from Windows shortcut:
- Download Quiet.exe from here joeware.net (virustotal check), works also on Windows 10 Pro Build 19041 (20H1; May 2020 Update)
- Create link on desktop (right click -> New -> Link) with following target:
- `D:\Devtools\Quiet.exe C:\Users\username\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run "source /home/username/scripts/displayvar.sh; /opt/shortcuts/phpstorm > /tmp/phpstorm-gui.log 2>&1"
- Phpstorm log output will now go into
/tmp/phpstorm-gui.log
- Optional: set link icon to this one from iconarchive.com