Skip to content
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

wsltty terminal closes as soon as it opens #186

Closed
Luiscri opened this issue Aug 30, 2019 · 18 comments
Closed

wsltty terminal closes as soon as it opens #186

Luiscri opened this issue Aug 30, 2019 · 18 comments

Comments

@Luiscri
Copy link

Luiscri commented Aug 30, 2019

I'm experimenting this type of error. Reading other issues here I launched it with the hold option and it showed this error message:

/bin/wslbridge: Exit 1.
error: 'C:\Users\luisc\AppData\Local\wsltty\bin\wslbridge-backend' backend program is missing

I installed WSL following the instructions of Microsoft official page and did not configure anything else. I'm pretty new to working on Windows, so sorry if I don't understand or know how to do quite simple things.

@Biswa96
Copy link
Contributor

Biswa96 commented Aug 30, 2019

Did you check if that "C:\Users\luisc\AppData\Local\wsltty\bin\wslbridge-backend" file exists?

@Luiscri
Copy link
Author

Luiscri commented Aug 30, 2019

No it doesn't, it only exists one called wslbridge under the same directory. How can I generate the missing file?

@Biswa96
Copy link
Contributor

Biswa96 commented Aug 30, 2019

Try to run the wsltty installer or the easiest way to extract the backend file from the wsltty installer with 7zip (or equivalent).

@Luiscri
Copy link
Author

Luiscri commented Sep 1, 2019

Running again the installer solves the problem, but after certain time the error appears again.
Now it also says:

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file

@OlivierMary
Copy link

@Luiscri WSL 2 ?

@Biswa96
Copy link
Contributor

Biswa96 commented Sep 1, 2019

If you are using Windows 10 insider build fast preview 18945 or greater there is a chance to get that error. Here is the same error occurs with other user rprichard/wslbridge#44 (comment). The workaround is to copy the System32/bash.exe from older insider build. Or use wslbridge2.

@OlivierMary
Copy link

If you are using Windows 10 insider build fast preview 18945 or greater there is a chance to get that error. Here is the same error occurs with other user rprichard/wslbridge#44 (comment). The workaround is to copy the System32/bash.exe from older insider build. Or use wslbridge2.

wslbridge2 + wsltty ? How to process ?

@Biswa96
Copy link
Contributor

Biswa96 commented Sep 2, 2019

wslbridge2 does not match in wsltty repository right now because there is a command line option (distribution name vs distribution GUID) that does not match. But one can execute wslbridge2 binary in mintty as a regular command.

@OlivierMary
Copy link

It's the system used by https://github.com/microsoft/terminal ? I can run on it, but mouse interaction with tmux didn't works

@cesarga
Copy link

cesarga commented Sep 3, 2019

If you are using Windows 10 insider build fast preview 18945 or greater there is a chance to get that error. Here is the same error occurs with other user rprichard/wslbridge#44 (comment). The workaround is to copy the System32/bash.exe from older insider build. Or use wslbridge2.

Thanks, using wslbridge2 worked.

I extracted the latest release to the wsltty bin directory and used these .bat to launch the terminals.

@echo off
rem WSL1 distro
C:\Users\cesar\AppData\Local\wsltty\bin\mintty.exe -i "C:\Users\cesar\AppData\Local\wsltty\wsl.ico" --configdir="C:\Users\cesar\AppData\Roaming\wsltty" C:\Users\cesar\AppData\Local\wsltty\bin\wslbridge2.exe -d Ubuntu-16.04
@echo off
rem WSL2 distro
C:\Users\cesar\AppData\Local\wsltty\bin\mintty.exe -i "C:\Users\cesar\AppData\Local\wsltty\wsl.ico" --configdir="C:\Users\cesar\AppData\Roaming\wsltty" C:\Users\cesar\AppData\Local\wsltty\bin\rawpty.exe wsl -d Ubuntu-18.04

Just remember to replace the username.

@mintty
Copy link
Owner

mintty commented Sep 3, 2019

Thanks. You seem to have edited the comment after first posting and replaced hvpty with rawpty for the WSL 2 case. Note that this will obstruct full transparency of mintty features, only those that are also supported by the MS terminal concept are available. Using hvpty gives you full mintty functionality.

The next mintty release shall dispatch to either wslbridge2 or hvpty automatically when triggered with option --WSL.

@OlivierMary
Copy link

For generic .bat

@echo off
rem Start mintty terminal for WSL package Ubuntu-18.04 in current directory
%LOCALAPPDATA%\wsltty\bin\mintty.exe -i "%LOCALAPPDATA%\wsltty\wsl.ico" --configdir="%APPDATA%\wsltty" %LOCALAPPDATA%\wsltty\bin\rawpty.exe wsl -d Ubuntu-18.04

@mintty
Copy link
Owner

mintty commented Sep 3, 2019

See my previous comment. Using rawpty, you don't really have mintty anymore.
Next wsltty release shall solve all issues.

@AiOO
Copy link

AiOO commented Sep 4, 2019

Thanks to @cesarga and @OlivierMary's comments, I've succeed to run WSL on mintty. 😻

On the other hand, I think the -d option is not working because default distribution always runs regardless of its value.

@OlivierMary
Copy link

Only rawpty work for me, but mouse interactions with tmux does not work....

See my previous comment. Using rawpty, you don't really have mintty anymore.
Next wsltty release shall solve all issues.

I just configure font + colors -_-"

@zippaaa
Copy link

zippaaa commented Sep 16, 2019

@mintty

Using hvpty gives you full mintty functionality.

@echo off
rem WSL2 distro
%LOCALAPPDATA%\wsltty\bin\mintty.exe -i "%LOCALAPPDATA%\wsltty\wsl.ico" --configdir="%APPDATA%\wsltty" %LOCALAPPDATA%\wsltty\bin\hvpty.exe -d Ubuntu-18.04

Right?
Windows 1903 (18980.1). WSL2 works. Mouse/keyboard works. Thanks.

@dxhisboy
Copy link

dxhisboy commented Oct 2, 2019

To know what is happening, maybe add -h always to the mintty's argument.

@mintty
Copy link
Owner

mintty commented Oct 2, 2019

Released 3.0.5 with new gateway.

@mintty mintty closed this as completed Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants