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

up/down arrow keys stop working after reconnect to dtach process with mosh #14

Open
simonmichael opened this issue Jun 14, 2018 · 1 comment

Comments

@simonmichael
Copy link

Thank you for dtach, I love it. mobile-shell/mosh#980 says the above is a dtach issue. Would you agree/have any ideas for a solution ? I forgot to mention that pressing the escape key once before each arrow key press seems to work around this somehow, allowing movement.

@crigler
Copy link
Owner

crigler commented Jun 17, 2018

It looks like mosh is setting the TERM environment variable differently than ssh. See mobile-shell/mosh#728 and mobile-shell/mosh#446.

htop may also be sending the initialization string defined for the current $TERM on startup, which can set the terminal into a different mode. Not all terminal types have an initialization string, though, and dtach will not resend the initialization string when reattaching (and not all programs use the initialization string on startup.) See https://www.tldp.org/HOWTO/Text-Terminal-HOWTO-16.html#ss16.5

You may be able to work around this and get mosh+dtach+htop to work by changing TERM to match what ssh is using before starting htop, or by using a command to resend the initialization string before telling dtach to re-attach to htop.

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

2 participants