mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.12k stars 104 forks source link

WSL terminal just flashes #297

Closed wodim closed 2 years ago

wodim commented 3 years ago

I installed wsltty to be used with WSL1 and Ubuntu 20.04 and if I open the "ubuntu 20.04 terminal" shortcut the window just flashes. On the other hand if I open the "wsl terminal" shortcut I get the same flash but the window says "there is no distribution with the supplied name" or something like that (I can't make it out). Any help?

Biswa96 commented 3 years ago
wodim commented 3 years ago
Biswa96 commented 3 years ago

I am not sure about the cause of this issue. For older Windows versions, try to use wsltty version older than 3.0.5. I have to spin up a VM to test that.

wodim commented 3 years ago

Thanks, that works.

Biswa96 commented 3 years ago

Hi, I have spent some time with that Windows build 17763.379. This issue seems to be duplicate of https://github.com/mintty/wsltty/issues/206 and https://github.com/mintty/wsltty/issues/198.

Due to obscure nature of WSL2 (like whole Windows OS) I have to rely on undocumented COM interface in wslbridge2 project. The Windows build 17763.379 is using older COM interface. So, using older than 3.0.5 wsltty release is better solution.

If someone want to hack wslbridge2, it can be modified for that Windows LTSC version like below:

index 7fb6c25..f454cd3 100644
--- a/src/LxssUserSession.hpp
+++ b/src/LxssUserSession.hpp
@@ -136,7 +136,6 @@ struct _ILxssUserSessionVtbl
     /* ILxssUserSession methods */
     void *CreateInstance;
     void *RegisterDistribution;
-    void *RegisterDistributionPipe;

     HRESULT(STDMETHODCALLTYPE *GetDistributionId)(
         ILxssUserSession *This,
Biswa96 commented 3 years ago

WSL in that Windows version seems to be some kind of mixture of old and new things. It has some code dated back when WSL was called ADSS (Android Subsytem). Also it has some new code for the WSL2 VM mode feature.

Biswa96 commented 3 years ago

Fixed this in wslbridge2. To apply the fix,

  1. Download the wslbridge2.zip from this Appveyor link (valid for 1 month).
  2. Extract wslbridge2.exe in C:\Users\UserName\AppData\Local\wsltty\bin path, given you've already installed wsltty.
wodim commented 3 years ago

Can I just wait for a release? Will it take long? Asking because, quite frankly, 3.0.2.3 works well. Thanks

Biswa96 commented 3 years ago

You can use 3.0.2.3, no issue there. I just fixed it from my side. Mischief managed! 🪄

Speaking of wslbridge2 release, I have no timeline for it. If there is any critical fix/feature I add a tag. Also I have some thought about wslg feature if it is not backported to Windows 10 stable release.

wodim commented 3 years ago

Great then. Thank you for your work!

mintty commented 3 years ago

About to release mintty 3.5.2, can we combine this with a wslbridge2 release?

mintty commented 2 years ago

I've added https://github.com/Biswa96/wslbridge2/commit/41575379b416703c49e2687e957440239a4cdfb7 as an additional patch for wsltty and released 3.5.3.

mailinglists35 commented 2 years ago

still experiencing this on LTSC 2019 fully updated and latest wsltty release

mailinglists35 commented 2 years ago

image

mailinglists35 commented 2 years ago

looks like i686 version cannot launch 64 bit wsl.exe (it does though launch full path to C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2019.522.0_x64__79rhkp1fndgsc\ubuntu1804.exe)

mailinglists35 commented 2 years ago

also there seem to be no uninstaller. I did the 64bt and works fine. did 64bit install just override all i686 files, or are some of i686 now just lying around useless?

mintty commented 2 years ago

wsl.exe is kind of hidden in WOW mode (32 bit apps under Windows 64 bit) but you are not supposed to run wsl.exe anyway in mintty as wsltty works via wslbridge2 instead, so this is a different issue.

mintty commented 1 year ago

This should be fixed (again?...) with 3.6.4.