Does not work with WSL 2
Was working perfectly, but just updated windows to the latest insider build for WSL 2 support
C:\Users\3vilp\ver
Microsoft Windows [Version 10.0.18917.1000]
C:\Users\3vilp\AppData\Local\wsltty\bin>wslbridge.exe
wslbridge error: failed to start backend process
note: backend error output: wslbridge-backend: wslbridge-backend.cc:45: int {anonymous}::connectSocket(int, const string&): Assertion `connectRet == 0' failed.
Are there any alternatives that work?
If you want to test I've done something here: https://github.com/Biswa96/wslbridge2/releases
Would be friendlier to do a PR against wslbridge, making the minimal changes required to support the pty naming at runtime. Also supporting other Linux flavour ptys e.g. Fedora, SuSE, if different, would be nicer.
A different error occur on WSL 2 with Windows 10 18945.1001.
C:\Users\brigh\AppData\Local\wsltty\bin>wslbridge
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
I've added another method hvpty in my wslbridge2 repository which uses Hyper-V sockets to connect with WSL2, can be used with mintty like terminals.
I've added another method hvpty in my wslbridge2 repository which uses Hyper-V sockets to connect with WSL2, can be used with mintty like terminals.
In my tests on latest Insider build, hvpty just exits without printing an error but rawpty wsl still works.
Cygwin now has Windows ConPTY support. See this commit. Released in Cygwin 3.1.0-0.3 test build. So, wsl.exe and other Windows console programs can be executed directly in mintty, no need to use wslbridge or winpty related programs.
So, if mintty is running under Cygwin 3.1.0 or later and Windows supports WSL and a distro is to be launched:
- if WSL 2 is supported and a distro is to be run which is configed to run under WSL 2,
- the user login shell can be execed
- instead of execing wslbridge-backend to fork the user login shell?
I can not understand your query properly. In simple words, mintty becomes similar as CMD technically.
How should the specification for mintty read to run wsl now: under what conditions, and with which arguments, does mintty invoke wsl, to either skip wslbridge-backend or invoke wslbridge-backend?
Theoratically, No backend, no extra code needed 🎉 Just type wsl.exe. One thing must be noted. The cygwin is now in test build so there are some issues.
BTW on build Microsoft Windows [Version 10.0.18975.1000] and for WSL1 I still get
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
it might be related to latest build changes.. is there any options to checkout logs or that backend output?
Try this https://github.com/Biswa96/wslbridge2. See previous comments. Also this https://github.com/mintty/wsltty/issues/186
Apologies for my ignorance - I don't understand all of the puzzle-pieces well enough. How can I make conemu use wslbridge2? I'm currently on Windows Insider build 18980, and started hitting this problem a few builds back.
@dseven Thank you for the question. I will add a detailed instructions in my repo and let you know.
I just ended up bypassing the WSL bridge. Tested on WSL 1 & 2.
set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu -u lester -cur_console:t:"Ubuntu" -- boot.sh
The boot.sh I run is of course optional, and could be removed or replaced with some other command you want to run. I've just used one for a long time with ConEmu to instantiate ANSI support so my powerline and boot splash look puuuurdy (some of it is prob superfluous).
#!/bin/bash
cat /mnt/d/some/long/path/conemu-maximus5/ConEmu/boot.ans
cd ~
screenfetch
bash -l -i
I tried that approach bypassing the WSL bridge but have to find out that it works quite laggy in some cases. I think this is related to reading directories and files. For example, I do the following sequence of actions (I am using oh-my-zsh):
- Type in
vim p - Press
<Tab> - See the following file list
package.json,package-lock.jsonandpom.xml - Press
<Tab>to selectpackage.json - Press
<Enter>to confirm the selection - Press
<Enter>to executevim package.json - Type
:qto quitvim
In ConEmu there is a delay after actions 2, 4, 5, 6 and 7, which makes the work quite uncomfortable. In native WSL console, there is no noticeable delay. I am not sure though if that's somehow wslbridge related.
@Smasherr - Might be related to rendering UTF/ANSI and screen redraws? I think there were some major changes around that on the Windows side. Have you tried it in the new MS Terminal app? Curious if it lags in that as well. I would personally enable debugging output to a log file, then run through those same steps. That way you'll be able to see the raw ANSI/etc that's being sent to the session, and any other silent errors/warnings that may be occurring.
Apologies for my ignorance - I don't understand all of the puzzle-pieces well enough. How can I make conemu use wslbridge2? I'm currently on Windows Insider build 18980, and started hitting this problem a few builds back.
I still do not find any instructions on how to use wslbridge2 with conemu. I just updated to windows 2004 and now Conemu crashes per @AiOO comment above.
For WSL 1 users (possibly WSL 2 but I don't know), I found a solution that seems to work pretty good. Similar to the answer posted by @LesterCovax, this bypasses the bridge, but it's less complicated. Now, it should be said, this is not my area of expertise and I figured this out with the help of someone in my group who is more savvy but, to my understanding, this uses the Windows terminal to access WSL instead of going through the bridge which seems to be a more efficient route anyway.
Instead of set PATH="%ConEmuBaseDirShort%\wsl...,
use wsl.exe -new_console:d:C:\<path_you_want_to_default_to>.
I hope this helps.
Fyi I started having this problem today on Windows 10.0.18363.1082 (aka release 1909).
Not quite sure how to implement hheavener-kyd's solution as I've been using wsltty. Screenshot: https://imgur.com/a/8Ughyan
Fyi I started having this problem today on Windows 10.0.18363.1082 (aka release 1909).
Not quite sure how to implement hheavener-kyd's solution as I've been using wsltty. Screenshot: https://imgur.com/a/8Ughyan
Odd...my WSL terminal worked just fine but my Cmder-mini was throwing this error. I just plugged the value into the startup scripts for Cmder-mini and it worked. Like I said, though, not really my area of expertise unfortunately.