x410 guide: https://x410.dev/cookbook/wsl/using-x410-with-wsl2/
bat-launcher.vbs:
If WScript.Arguments.Count <= 0 Then
WScript.Quit
End If
bat = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) & WScript.Arguments(0) & ".bat"
arg = ""
If WScript.Arguments.Count > 1 Then
arg = WScript.Arguments(1)
End If
CreateObject("WScript.Shell").Run """" & bat & """ """ & arg & """", 0, False
start-idea.bat
@echo off
REM *** Start X410 in Windowed Apps mode. If X410 is already running in Desktop mode,
REM *** it'll be silently terminated and restarted in Windowed Apps mode.
x410.exe /wm
REM *** Start GNU Octave
ubuntu2004.exe run "export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0; /usr/bin/idea"
To run Linux GUI apps, create shortcut:
C:\Windows\System32\wscript.exe "C:\wsl-aps\bat-launcher.vbs" "start-idea"