-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wont run on latest insider build (for WSL 2) #171
Comments
Same issue. |
This way of starting the wsltty-installed copy of mintty was never supposed to run. You would use the shortcut (desktop or start menu) or, from a cmd.exe, the WSL.bat script. |
This is from debugging post upgrade.
is what happens when i run it from a .bat Ive already opened rprichard/wslbridge#44 as a result |
For me after migrating an Ubuntu distro to WSL 2, wsltty window opens, and closes again. I'm unsure how to get some error text to examine. I've tried
|
Does "WSL 2" still work for anybody? Would anyone open an issue with WSL about broken interworking? |
Also, does reverting to WSL 1 fix the issue? |
WSL2 works in my PC well. @mintty are you using insider builds? There are many issues that have to be fixed. I also did break it in first time. Check if DHCP Client, DNS Client and Host Network Service are running properly. This may be worth of reading https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes. @myoung34 How did you debug wslbridge? Mine only shows |
@Biswa96 mine shows that error as well as of yesterday |
@mintty reverting to WSL 1 will fix the issue |
I don't have WSL 2 yet (or the required Windows update). |
wsl runs fine from cmd.exe, thats currently the only way to get into wsl 2. |
The diverge is that WSL2 isn't on localhost as with WSL1, so the [ed] A reasonable-ish workaround for now is to use stock mintty (Windows Git's is convenient) and then [ed2]
Or PuTTY, or ttyd, or NCSA telnet from 1987. |
Is any relevant information in the registry? How would wslbridge connect to its backend anyway? |
Not to the question at hand. Spitballing (and not thinking about it very hard) one could spawn WSL2 is (to a first order) the same as a Hyper-V Linux Container on Windows. Imagine hypothetical "mintty for Windows Docker". |
If you have an idea how to solve the issue, go ahead and try it. |
You can track tangential #3279 although that isn't exactly on point and won't address the problem. To the extent that one flips status it would obviate the need for the bridge. As of this writing today, the cause of the This said (and complicating matters) I gather sharing |
From the hint by @therealkenc
I have tried with HyperV sockets. See my hvtool project. But the problem is that cygwin does not support it, see this mail. |
|
No. Assume that as alternative of |
Not exactly "in mintty" per se. To do this (air quote) "right" can use the ConPTY interface and call My motivation (if that's the word) for doing the pty code in a What we're really writing here is a win32 port of socat. I call dibs on the github repo names
and on the Linux side...
Which is exactly, as the wslbridge readme says, quoth "connecting to the WSL command-line environment over TCP sockets, as with ssh, but without the overhead of configuring an SSH server". Not that you would do it that way, because we don't need to tunnel (read: telnet) tty over tcp. Again hand-waving:
Which is Biswa96's And as a closing note, if it isn't obvious, that should ideally be built into |
@therealkenc: I tried your mintty-conpty patch yesterday but it did not work for me. |
Alright, appreciate someone trying. I think I have a guess as to the problem (I made precisely zero effort at config management let alone an installer). I'll edit this post once it is fixed. [edit] I spun up a fresh Windows 10 1903 install in a VM and it seems to run okay here, so I'd need more deets on "did not work". I had assumed because I just blindly copied the two MSYS2 dlls maybe it was dependent on existence my own MSYS2 dev environment being present, but I guess not. I've also enabled issue submissions on the github repro. Sorry about that. I wasn't intending to obstinate; I just cloned mintty and literally never noticed they don't allow issue submissions, and my repo inherited the settings. No need for you (or anyone) to submit bug reports, mind. I don't really expect or intend |
@Biswa96, I write:
Maybe the culprit is the ENABLE_VIRTUAL_TERMINAL_PROCESSING flags, because it enables MS's own handling of escape sequences (https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences), which is the wrong thing to do when running applications (like WSL) from a dedicated terminal. |
Test and demo file for text attributes attached. I have the impression that if we use conhost, and maybe even if we use ConPTY at all, we are artifically restricted to the set of escapes that MS grants us, by handling them in their own idea of "terminal" implementation. Maybe we should request them to provide a transparent mode, passing all escapes unfiltered. |
Actually, that is microsoft/terminal#1173 |
I guess, access via ssh would work well, but you'd need to setup an ssh server first, in every WSL distribution, right? And how do you find the IP/port to connect to? |
I have same issue on Windows 10 18945.1001 & WSLtty 3.0.2.
|
wsl --set-version 1 was failed first time for me when from production to insider program, |
Cygwin now has Windows ConPTY support. See this commit. Released in Cygwin 3.1.0-0.3 test build. So, |
I had tried that already and yes, it works. Unfortunately, this way |
@Biswa96, does either wslbridge or wslbridge2 work for you with WSL 2 as one of your comments above suggests? |
@Biswa96, in your new tool suite, |
Just provide a code sample about how to distinguish WSL1 and WSL2 without reading registry and any undocumented methods. There are many ways to do that with undocumented methods. The rest of the questions are too broad. I will try to add the working procedure in project's README. |
What undocumented methods are you aware of? I wouldn't mind reading the registry, the |
Mintty already scans the registry for option |
WslReverse is full of those. It is hard (but not impossible) to combine wslbridge2 (for WSL1) and hvpty (for WSL2) because working principle is very different. On the other hand rawpty is for everything. |
Unfortunately, as I said above (#171 (comment)), rawpty does not connect WSL to mintty functionality transparently; rather it restricts the environment to the MS terminal idea. But wslbridge2 and hvpty do not do that. What's the difference? |
Oooo... Now I understand your query. Remember, once I said about the idea of making a telnet + ssh like thing. wslbridge2 uses AF_INET and hvpty uses AF_HYPERV. Both uses their own backend to spawn a master/slave pty in WSL then sucks the raw buffer from slave side through sockets. See this beautiful piece of art. Whereas rawpty uses the ConPTY implementation in a "raw" way. Also I have tested the text-attributes.txt file that you had provided before. |
Can you add the Also, not to break #156 again, static linking of the backend will be good. |
Furthermore, wslbridge2 does not support the special |
Released 3.0.5. |
I frankly didn't understand a lot of what was discussed here, but came here as I seemed to have the same problem on WSL2. I'm on OS build [Version 10.0.19041.113]. So I just ran ttyd as I maybe missed the point of this discussion, but in case this simple workaround helps someone ... |
So what is ttyd, where did you get if from, and what's the problem that it solves for you? |
Oops, sorry I hadn't realized I'd ended up on wsltty |
Worked until latest version of windows (insider build for WSL 2 support)
The text was updated successfully, but these errors were encountered: