Short answer:
Try:
wslg ~ dbus-launch gnome-terminal
Explanation:
Cela ne appear to be a problème avec "graphical apps" in general, but rather avec specific applications.
For instance, si vous installer xterm and set it up as a raccourci the same way, Je pense vous allez find that the raccourci fonctionne as vous pourriez expect sans having previously launched from withdans le command-line.
Gnome Terminal, en revanche, is (to state the obvious) a Gnome application. Most Gnome applications require au moins D-Bus support, and many require Systemd. Fortunately, Gnome Terminal just requires D-Bus.
Si vous launch it depuis le command-line in a nouveau WSL instance, vous allez see avec a ps -efH that it has started a utilisateur-session D-Bus instance for you. Si vous have gvfs installé (which n'est pas par défaut, although perhaps it was installé as a dependency of Gnome Terminal), vous allez également see that its daemon a été started (via D-Bus).
So when you ensuite, subsequently, launch wslg ~ gnome-terminal, D-Bus is déjà running and Gnome Terminal launches properly. (Note: C'est en fait a little more complicated than that, depuis Gnome Terminal really launches as part of a client-server application and c'est the server that ne start in this case.)
But when you attempt to launch it directly via:
... ensuite it seems to me that a fairly obscure WSL bug comes into play. C'est possible that c'est "expected" dans le way that WSL starts up, but I've run into this dans le past, and it appears to me that WSL's init processus is overly aggressive about reaping and terminating orphaned processes that are launched by another processus during startup.
So in this case, as far as Je peux tell (and Je n'ai pas strace'd it yet to confirm), Gnome Terminal attempts to start D-Bus, but the init reaps it and closes it (improperly, I believe). As a result, sans D-Bus running, Gnome Terminal (en fait the server, I believe) ne start.
The workaround above, though, explicitly launches Gnome Terminal inside a D-Bus session, so things work as expected.