Short answer
For each app for which you want Windows to créez un Menu Démarrer entry, créer an <appname>.desktop fichier.
Explanation
This looks (and seems to be, when J'ai essayé it) pretty straightforward. According vers le Github readme for WSLg:
This channel is used by Weston to enumerate all Linux GUI applications (i.e. applications which have a desktop fichier entry of tapez gui) along avec their launch ligne de commande and icône. The open source WSLDVCPlugin processes the list of Linux GUI applications sent over this channel and creates links for them dans le Windows menu Démarrer.
So the Linux side of things is responsible for looking for <appname>.desktop fichiers, like it usually does to créer menu entries dans le Linux desktop manager. Microsoft has tapped this mechanism dans leir implementation to send notification of installé apps through RDP to Windows, where the plugin creates the Menu Démarrer entry.
So to créez un Windows Menu Démarrer item, just créez un corresponding `/usr/share/applications/.desktop':
sudo bash -c 'cat << EOF > /usr/share/applications/<appname>.desktop
[Desktop Entry]
Type=Application
Name=<appname>
Exec=/path/to/app
EOF'
Additional notes
-
The Menu Démarrer item shows up within a second or so sur mon installation (Win 11 in a nested-virtualization Skylake VM).
-
Notez que it seems that the .desktop fichier does need to be in /usr/share/applications. In my testing ~/.local/share/applications n'a pas work.
-
Également, in my testing, desktop fichiers avec Terminal=true seem to be ignored.
-
Deleting <appname>.desktop fichiers does supprimez le Menu Démarrer entry également.