bostrot / wsl2-distro-manager

A GUI to quickly manage your WSL2 instances
https://apps.microsoft.com/store/detail/wsl-manager/9NWS9K95NMJB
Other
1.82k stars 111 forks source link

[BUG] wsl.conf not created after configuration changes #185

Closed tempwswm closed 1 year ago

tempwswm commented 1 year ago

Is there an existing issue for this?

Current Behavior

I tried to change the host for instance using this software, but it did not work, I checked that the wsl file was not created, I created it manually and it was not modified.

Expected Behavior

The file needs to be created and contain key-value pairs.

Steps To Reproduce

  1. create an instance using dockerhub:debian:bullseye
  2. passwd root manually
  3. install nano sudo git
  4. stop instance
  5. change hostname setting using this software
  6. not work
  7. echo -e "[network]\nhostname=guitest" >> /etc/wsl.conf
  8. it works
  9. change hostname setting using this software again
  10. not work

Environment

- Windows Version: "Windows 10 Pro" 10.0 (Build 19045)
- WSL Distro Manager Version:WSL Manager v1.8.4 on windows
- WSL Version:2
- Source: GitHub releases

Anything else?

maybe error here I tried these lines of commands, this line will waitting user(me) to input password twice. Please check. this issue may also need to be handled together.

Poor English, thanks

github-actions[bot] commented 1 year ago

Hello there! As you are a first time Issuer please read our Code of Conduct. Please also check whether your issue description is reasonable and complete. If you are having an issue always include the version you are using (WSL, this app, Windows) as well as a way to reproduce it.

bostrot commented 1 year ago

The lines you provided are only when you create a user for non-docker images.

I tried reproducing your steps, but it works for me:

cat /etc/wsl.conf
[network]
hostname = testhost