3

I am not able to get a custom start menu shortcut to a WSL2 GUI app working inside Windows 11. The app in question is Android Studio which is installed with snap using https://github.com/arkane-systems/genie. Other installed apps that automatically creates the shortcut works (for example GIMP).

The current shortcut in Windows that is not launching Android Studio is C:\Windows\System32\wslg.exe ~ -d Ubuntu android-studio. I am following this answer for creating the shortcut https://superuser.com/a/1672462/1096949.

Is there anything special with launching apps installed with snap? Android studio can be launched inside WSL with the android-studio command.

Any help is appreciated!

Isak
  • 425

1 Answers1

2

Ironically, I just read this today. I don't use Genie myself, but I was perusing the Readme in preparation for perhaps giving it a shot.

Note a couple of important pieces of the Genie readme:

NOTE: Before you install genie for the first time, read ALL of this page.

;-)

And at the bottom of the page:

BUGS

Linux GUI apps started from the Windows Start Menu items created by WSLg will run outside the bottle.

In other words, when you attempt to launch Android Studio via the automatically created shortcut, it launches you into a WSL session where:

  • Systemd is not PID1
  • Thus Snap cannot run
  • Thus Android Studio, installed from Snap, will not work.

You might be able to get it working by editing the wslg.exe launch command with some of the insight from this FAQ entry, but I cannot be sure.

NotTheDr01ds
  • 28,025