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 immediately closes when using WSL1 distro #267

Closed
ypnos opened this issue Jan 4, 2021 · 14 comments
Closed

wsltty immediately closes when using WSL1 distro #267

ypnos opened this issue Jan 4, 2021 · 14 comments

Comments

@ypnos
Copy link

ypnos commented Jan 4, 2021

I'm running Windows 1909 (Build 18363.1256) and installed WSLTTY 3.4.4

I have several distros installed, WSL1 and WSL2.

"Debian" is the default distro and running in WSL1, while "Debian2" is a copy of said distro running in WSL2.

(base) PS C:\Users\jordajo\AppData\Local\wsltty\bin> .\mintty.exe --WSL="Debian"
(base) PS C:\Users\jordajo\AppData\Local\wsltty\bin> .\mintty.exe --WSL=""
(base) PS C:\Users\jordajo\AppData\Local\wsltty\bin> .\mintty.exe --WSL="Debian2"

The first two calls open a mintty window with no text that instantly closes. (However, if the distro was previously terminated, it changes status to "Running" in wsl --list -v output.)
The third (WSL2 distro) opens a window and a shell prompt appears. It then works as expected.

@mintty
Copy link
Owner

mintty commented Jan 4, 2021

Works here, with newer Windows version.
In terms of Windows update policy, 1909 is quite an old version, maybe you'd like to test with an update?

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

Unfortunately, I am currently stuck with this version.

I forgot to mention that it worked once after installing wsltty, but stopped working after I terminated the distribution.

@mintty
Copy link
Owner

mintty commented Jan 4, 2021

There were similar problems before. Maybe you have an older version of wslbridge2 in your path?
What does where wslbridge2.exe say if you cd to the wsltty installation directory (not the bin subdirectory)?

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

It says nothing.

@mintty
Copy link
Owner

mintty commented Jan 4, 2021

@Biswa96, any idea?

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 4, 2021

@ypnos Did any of wsltty version from 3.4.1 to 3.4.3 work?

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

Before I had version 3.0.2.3 (as it was the last one that supported my even more ancient previous Windows version). It did not work with Windows 1909 anymore, that's why I tried 3.4.4 and it worked only once.

Which version would you recommend me to try?

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

Sometimes there is text in the terminal that starts with "note:" ... I cannot read more as the window instantly vanishes.

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 4, 2021

Windows 10 version 1909 is not in the blacklist. Can you open the %LocalAppData%\wsltty\bin folder in Command Prompt and run wslbridge2.exe -d Debian (and with Debian2)? What did you see? Are you using any Docker related software?

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

I get:

PS C:\Users\jordajo\AppData\Local\wsltty\bin> .\wslbridge2.exe -d Debian
note: backend error output: /bin/sh: 1: exec: /mnt/c/Users/jordajo/AppData/Local/wsltty/bin/wslbridge2-backend: Permission denied

... and this also solved the issue!

Problem was that executable permissions were not set for wslbridge/wslbridge2 binaries in that directory. I set them now with chmod and it works!

For reference, I use this wsl.conf:

[automount]
enabled = true
options="metadata,dmask=033,fmask=133,uid=1000,gid=1000,case=off,noatime"

Thank you for your help. I really hated having to use Windows Terminal instead. WSLTTY has better font rendering and feature set.

@Biswa96
Copy link
Contributor

Biswa96 commented Jan 4, 2021

Actually, I did not even help a little bit 😄

@mintty
Copy link
Owner

mintty commented Jan 4, 2021

To be precise, you set chmod +x wslbridge-backend on the WSL side?
So did you add WSL distributions after installation of wsltty?

@mintty
Copy link
Owner

mintty commented Jan 4, 2021

If my suspicion is confirmed, this is likely a duplicate of #163.
Note the following in section Configuration of the project page:

The Start menu folder WSLtty contains the link configure WSL shortcuts. This function is initially run when wsltty is installed. If should be rerun after adding or removing WSL distributions, in order to create the respective set of shortcuts in the Start menu.

@ypnos
Copy link
Author

ypnos commented Jan 4, 2021

I did re-run the install script several times but my real problem was that at first I had set the mount options with "fmask=133" but without "metadata". At some later point I understood my mistake and added "metadata", but as I didn't see the connection to wsltty, at this point I did not re-run any scripts.
Thank you for your time!

@ypnos ypnos closed this as completed Jan 4, 2021
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

3 participants