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

ConPTY(?) inserts broken control codes into tmux sessions. #7185

Closed
Efreak opened this issue Aug 5, 2020 · 7 comments
Closed

ConPTY(?) inserts broken control codes into tmux sessions. #7185

Efreak opened this issue Aug 5, 2020 · 7 comments
Labels
Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@Efreak
Copy link

Efreak commented Aug 5, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.959]
Windows Terminal version (if applicable): N/A.

Any other software?
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
tmux 2.6

Steps to reproduce

Open an ssh (other?) session with a running tmux session with default configuration.

Expected behavior

tmux session opens as you've left it.

Actual behavior

tmux opens with 1;0c appended to whatever was at the prompt/cursor previously. Applications that consume control characters attempt to do something with them. (I haven't run into any issues with that yet, but it's possible; mostly I'm just in nano, which only complains about Unknown sequence).


Fix

Add a line to tmux.conf: set -s escape-time 10. Do this on every remote server you log into.

I should note that this is not actually an issue with WT per say--it also affects cmd.exe (which is what I primarily use for quick, single-command sessions). However, the fix I found was located
here, which links to here as the correct place to file an issue.

Screenshots

Screenshots

Connecting to my laptop running Ubuntu 18.04.3 via WSL
Running on my laptop in WSL

Running on a remote VPS with Ubuntu 18.04.3:
Running on a remote actual-linux server

If nano is running, I get a ding and an Unknown sequence message:
Opening a session that has nano running
This one with a running editor has gotten me several times before, as I tend to leave files open, sometimes with modifications to finish later.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 5, 2020
@DHowett
Copy link
Member

DHowett commented Aug 5, 2020

Would you mind trying this with SSH 8.1 from the Win32-OpenSSH releases page? This seems very similar to the issue where Vim starts in replace mode because Win32-OpenSSH 7.7 won’t pass the escape sequence through unmodified and WT/conhost is replying to a DSR

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 5, 2020
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Aug 9, 2020
@ghost
Copy link

ghost commented Aug 9, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Aug 12, 2020
@zb140
Copy link

zb140 commented Aug 19, 2020

Not the OP, but I just came across this issue by searching because I'm seeing the same issue. I tried it with SSH 8.1 and I can confirm it does indeed fix the problem. And the good news is, the SSH issue tracker says v8.1 is expected to ship in the next version of WIndows (PowerShell/Win32-OpenSSH#1646) so I can be lazy about updating all my computers if I'm willing to live with it another couple months 😉

Thanks!

@ghost ghost removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Aug 19, 2020
@idl0r
Copy link

idl0r commented Jan 17, 2021

Sorry but is there any chance to get an official openssh client bump that's been installed through the feature list / window?

@DHowett
Copy link
Member

DHowett commented Jan 18, 2021

I’m sorry, we don’t own that component. The best place to ask would be on their repository 😄

@idl0r
Copy link

idl0r commented Jan 18, 2021

Is https://github.com/PowerShell/Win32-OpenSSH the official repo for this? is that's the one that's being installed through the features setup? I just thought that you know someone there by chance, since this is an official (or kind of)Microsoft one as well?

@shivanshu3
Copy link
Member

I am not able to repro this behavior on cmd.exe. It only repros on Windows Terminal for me.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

5 participants