microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.1k stars 304 forks source link

Install instructions for Inbox WSL #1288

Open fredmeews opened 6 days ago

fredmeews commented 6 days ago

Is your feature request related to a problem:

My team works in an environment where the Microsoft Store is blocked and therefore cannot use "wsl --update". We use the Manual Install instructions.

Describe the solution you'd like:

Please provide instructions for manual install of wslg given an "inbox" install on Windows 11.

Describe alternatives you've considered:

Sadly my team does not control firewall rules, there is no alternative to access the Microsoft store.

Additional context:

No response

crramirez commented 5 days ago

Use wsl --update --web-download. In either case WSLg is already enabled on Inbox WSL in Windows 11

crramirez commented 5 days ago

https://github.com/MicrosoftDocs/WSL/pull/2030

fredmeews commented 4 days ago

Adding --web-download results in a 403. Also if WSLg is enabled in inbox WSL on Windows 11, I don't see it.

elsaco commented 2 days ago

WSLg is part of the system distro, so when you run wsl --update --pre-release --web-download and a new version is available, WSLg is automatically update.

Run wsl --system only and you'll get:

PS C:\Users\elsaco> wsl --system
wslg [ /mnt/c/Users/elsaco]$  cd
wslg [ ~ ]$ 
wslg [ ~ ]$ cat /etc/os-release
NAME="Common Base Linux Mariner"
VERSION="2.0.20240609"
ID=mariner
VERSION_ID="2.0"
PRETTY_NAME="CBL-Mariner/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/cbl-mariner"
BUG_REPORT_URL="https://aka.ms/cbl-mariner"
SUPPORT_URL="https://aka.ms/cbl-mariner"
wslg [ ~ ]$ whoami
wslg
wslg [ ~ ]$ id
uid=1000(wslg) gid=1000(wslg) groups=1000(wslg)

You'll find system.vhd in C:\Program Files\WSL

crramirez commented 2 days ago

@fredmeews as a last resort, you can install it from here: https://github.com/microsoft/WSL/releases/tag/2.2.4

fredmeews commented 2 days ago

@elsaco I installed this using the manual instructions which links to the github release package referred to by @crramirez.

This "inbox" installer appears to have some significant differences with your environment...

  1. When I run the --system command I get...

    C:\>wsl --system
    There is no distribution with the supplied name.
  2. There is no folder C:\Program Files\WSL - wsl.exe is installed in C:\Windows\System32

  3. wslg.exe is also in Windows32 but there is no evidence of it running in my distro, i.e. no /mnt/wslg directory.

  4. I cannot find the file you referenced system.vhd

crramirez commented 2 days ago

Can you verify if you have the latest updates in your Windows 11?

crramirez commented 2 days ago

Can you verify if your distro is in WSL 2?

wsl --list --verbose

fredmeews commented 2 days ago

Can you verify if you have the latest updates in your Windows 11?

C:\>ver

Microsoft Windows [Version 10.0.22000.3197]

C:\>wmic qfe list full

Caption=http://support.microsoft.com/?kbid=5041976
HotFixID=KB5041976
InstalledBy=NT AUTHORITY\SYSTEM
InstalledOn=8/25/2024

Can you verify if your distro is in WSL2?

My distro is Rocky8...

C:\>wsl --list --verbose
  NAME          STATE           VERSION
*  Rocky8        Running         2

C:\>wsl --status
Default Distribution: Rocky8
Default Version: 2

Windows Subsystem for Linux was last updated on 9/23/2024
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: 5.10.16
crramirez commented 2 days ago

Ok, first update your inbox wsl, with: wsl --update --inbox then after restarting, install the store version from the msix package from the github release page.

I see your default distro is wrong: wsl --set-default Rocky8

How do you know that wslg is not running? Can you check the value of the environment variables DISPLAY and WAYLAND_DISPLAY? If they have value, you have wslg

fredmeews commented 2 days ago

first update your inbox wsl, with: wsl --update --inbox

I get the same error code mentioned in issue 8603 - appears this is hitting the store or some related microsoft site that is blocked from my location.

C:\>wsl --update --inbox
Checking for updates...
Error: 0x8024500c

_How do you know that wslg is not running? Can you check the value of the environment variables DISPLAY and WAYLANDDISPLAY? If they have value, you have wslg

Well for one thing, there is no /mnt/wslg. Both of those environment variables are empty.

$ echo $DISPLAY

$ echo $WAYLAND_DISPLAY
elsaco commented 2 days ago

@fredmeews you might want to grab the latest from https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi and do a manual update.

fredmeews commented 2 days ago

Thanks @elsaco. I just updated using that link last week. Updated again, same issue.

The bottom line seems to be that when installed via this manual update, WSLg is not enabled or fully installed.

elsaco commented 2 days ago

WSLg is definitely part of the package from the store or direct download. Please grab latest WSL2 release from https://github.com/microsoft/WSL/releases/download/2.3.24/wsl.2.3.24.0.x64.msi and extract it.

On my system:

PS C:\Users\elsaco\Downloads> msiexec.exe /a C:\Users\elsaco\Downloads\wsl.2.3.24.0.x64.msi /qb TARGETDIR=g:\local

PS C:\Users\elsaco\Downloads> ls G:\local\PFiles64\WSL\

    Directory: G:\local\PFiles64\WSL

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           9/30/2024 11:20 AM                da-DK
d----           9/30/2024 11:20 AM                de-DE
d----           9/30/2024 11:20 AM                en-gb
d----           9/30/2024 11:20 AM                en-US
d----           9/30/2024 11:20 AM                es-ES
d----           9/30/2024 11:20 AM                fi-FI
d----           9/30/2024 11:20 AM                fr-FR
d----           9/30/2024 11:20 AM                it-IT
d----           9/30/2024 11:20 AM                ja-JP
d----           9/30/2024 11:20 AM                lib
d----           9/30/2024 11:20 AM                modules
d----           9/30/2024 11:20 AM                nb-NO
d----           9/30/2024 11:20 AM                nl-NL
d----           9/30/2024 11:20 AM                pl-PL
d----           9/30/2024 11:20 AM                pt-BR
d----           9/30/2024 11:20 AM                ru-RU
d----           9/30/2024 11:20 AM                sv-SE
d----           9/30/2024 11:20 AM                tools
d----           9/30/2024 11:20 AM                wslsettings
d----           9/30/2024 11:20 AM                zh-CN
d----           9/30/2024 11:20 AM                zh-TW
-a---           9/27/2024 12:57 AM        3013176 libwsl.dll
-a---           9/27/2024 12:56 AM          79920 lxutil.dll
-a---           10/9/2023  5:44 PM        1419192 msal.wsl.proxy.exe
-a---           8/12/2024 10:38 PM        2731064 msrdc.exe
-a---           8/12/2024 10:38 PM       12028848 rdclientax.dll
-a---           8/12/2024 10:38 PM        4509752 rdpnanoTransport.dll
-a---           8/12/2024 10:38 PM         244280 RdpWinStlHelper.dll
-a---           8/15/2024 12:07 AM      407298560 system.vhd
-a---           9/27/2024 12:57 AM        3693088 wsl.exe
-a---           9/27/2024 12:56 AM        1580576 wsldevicehost.dll
-a---           9/27/2024 12:56 AM         206384 WSLDVCPlugin.dll
-a---           8/15/2024 12:07 AM            125 wslg_desktop.rdp
-a---           9/27/2024 12:57 AM        3694112 wslg.exe
-a---           8/15/2024 12:07 AM            190 wslg.rdp
-a---           9/27/2024 12:57 AM        2930208 wslhost.exe
-a---           9/27/2024 12:57 AM        2885688 wslrelay.exe
-a---           9/27/2024 12:57 AM        5783600 wslservice.exe
-a---           9/27/2024 12:57 AM         508472 wslserviceproxystub.dll

Check WSL version:

PS G:\local\PFiles64\WSL> .\wsl.exe --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4169

However, why running wsl.2.3.24.0.x64.msi is not working on your system is puzzling!

crramirez commented 2 days ago

@fredmeews i think that it is time for you to talk to your IT department.

fredmeews commented 2 days ago

@elsaco @crramirez Thanks much for all the prompt feedback. I will discuss this with IT and let you know what I find.