Skip to content

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

@Efreak

Description

@Efreak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to somethingNeeds-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions