WhitewaterFoundry / Pengwin

A Linux distro optimized for WSL based on Debian.
Other
1.48k stars 105 forks source link

Running tmux updates WSL2 configuration #730

Open kerbe opened 2 years ago

kerbe commented 2 years ago

Describe the bug When I start tmux, I receive following error: Updated configuration for WSL2. Restart Pengwin to apply changes.

While in tmux, I can start new windows without getting that error. If I exit tmux, and start new one right away, I don't get that error.

After this, if I close whole Pengwin, and start it again, I get that same updated configuration warning. If I close Pengwin and reopen, no error anymore. Until I start tmux, then all repeat s itself.

To Reproduce Steps to reproduce the behavior:

  1. Start Pengwin
  2. Start tmux -> error appears
  3. Close tmux, close Pengwin
  4. Start Pengwin -> error appears
  5. Repeat from step 2.

Expected behavior I don't expect running tmux to affect WSL2 in such way that it would require whole restart.

Additional context I have dug this up a bit trying to figure out what causes this.

When starting Pengwin, my /etc/environment is like this:

DISPLAY=192.168.1.104:0.0
NO_AT_BRIDGE=1
WSL2=2
LIBGL_ALWAYS_INDIRECT=1

After I have started tmux, /etc/environment is like this:

DISPLAY=:0
NO_AT_BRIDGE=1
WSL2=3
LIBGL_ALWAYS_INDIRECT=1

I think that this change happens in /etc/profile.d/00-pengwin.sh. I have no idea what are these Type 1, 2 and 3 WSL2's, and what causes actual change.

Basic Troubleshooting Checklist

[ x] I have searched Google for the error message. [x ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [ x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x ] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues. [ x] I have run Windows 10 updates and restarted. [x ] I have restarted WSL service: wsl.exe --terminate WLinux wsl.exe --shutdown.

Insert here:

Pengwin Version

Run grep "PENGWIN_VERSION" /etc/os-release in Pengwin.

Insert here: PENGWIN_VERSION="22.1.6"

WSL general info

Run wslsys in Pengwin.

Insert here:

$ wslsys
WSL Version: 2
Locale: fi_FI
Release Install Date: Fri Jun  5 02:20:59 EEST 2020
Branch: vb_release
Build: 19043
Full Build: 19041.1.amd64fre.vb_release.191206-1406
Display Scaling: 1
Windows Theme: light
Windows Uptime: 0d 1h 42m
WSL Uptime: 0d 1h 41m
WSL Release: Pengwin
WSL Kernel: Linux 5.10.60.1-microsoft-standard-WSL2
Packages Count: 1037
crramirez commented 2 years ago

Hello @kerbe ,

Thank you for reporting it. I'll take a look.

Regards, Carlos