yuk7 / ArchWSL

ArchLinux based WSL Distribution. Supports multiple install.
https://git.io/archwsl
MIT License
6.91k stars 201 forks source link

Cannot change the default user with arch.exe #346

Open ray24777 opened 10 months ago

ray24777 commented 10 months ago

Describe the issue Error with strange text (shown below) was shown when trying to change the default user with "Arch.exe config --default-user".

C:\Arch>Arch.exe config --default-user ray
ERR: wsl: �hKm0R localhost �NtM�n
�FO*g\��P0R WSL0NAT !j_
N/ec localhost �Nt0
1000
&errors.errorString{s:"w\x00s\x00l\x00:\x00 \x00\xc0hKm0R \x00l\x00o\x00c\x00a\x00l\x00h\x00o\x00s\x00t\x00 \x00\xe3N\x06tM\x91n\u007f\f\xffFO*g\\\x95\xcfP0R \x00W\x00S\x00L\x00\x020N\x00A\x00T\x00 \x00!j\x0f_\vN\x84v \x00W\x00S\x00L\x00 \x00\rN/e\x01c \x00l\x00o\x00c\x00a\x00l\x00h\x00o\x00s\x00t\x00 \x00\xe3N\x06t\x020\r\x00\n\x001000"}

To Reproduce Install the package, set a new user and run above command in windows.

Expected behavior A change of default user of wsl.

Screenshots image

Enviroment:

ray24777 commented 10 months ago

Sloved.

Just disable the system proxy of Windows, and then the command could be executed. Still very strange. Is there a bug?

mrcaidev commented 7 months ago

Setting wsl2.networkingMode to mirrored also solves the problem.

Here is my current .wslconfig below.

[wsl2]
networkingMode=mirrored
dnsTunneling = true
autoProxy = true

[experimental]
autoMemoryReclaim = gradual

Adding the line networkingMode=mirrored solves the problem.

whyXVI commented 4 months ago

LOL I edited .wslconfig before trying wsl -d Arch -u {username} and succeeded. I thought the bug can be solved by an alternative way of adding default user before I read this issue