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

Screen corruption with e.g. irssi (ncurses/REP related?) #1064

Open
paravoid opened this issue Aug 19, 2019 · 3 comments
Open

Screen corruption with e.g. irssi (ncurses/REP related?) #1064

paravoid opened this issue Aug 19, 2019 · 3 comments

Comments

@paravoid
Copy link

This is reproducible on a stock Debian buster on both server & client, with both VTE-based terminals (mate-terminal, terminator) as well as xterm. The server was recently upgraded from Debian stretch, and this is when this manifested (this is a regression). This would be mosh 1.3.2, irssi 1.2.0, ncurses 6.1, VTE 0.54.2, xterm 344.

This is relatively easy to reproduce: connect via mosh to a remote system and run irssi, (no configuration necessary). Drawing is corrupted: the first line has garbage after the banner ( Irssi v1.2.0-2 - http://www.irssi.org), and the status bar isn't filled up with the default color. Running the same over SSH instead of mosh works fine. No tmux, screen or anything else involved.

Searching for more information about this issue, I found that ncurses in mid-2017 added "REP" to xterm, something which mosh (AIUI?) doesn't support. The ncurses FAQ seems to have a dedicated entry for this, even suggesting that TERM should should not be set to xterm by anyone but xterm itself (something that mosh does, again AIUI). Not sure if that is the real cause or not - can't say I am in expert in neither mosh, terminal emulators or ECMA standards from 1997 :)

With the little I understand, it sounds like mosh either needs to support REP, and/or switch to a different TERM variable - perhaps even having its own entry in the terminfo database?

#1041 may be related.

@cgull
Copy link
Member

cgull commented Sep 6, 2019

Confirmed on openSUSE Tumbleweed 20190814.

Workaround: env TERM=xterm-basic irssi

@paravoid
Copy link
Author

The 20220312 ncurses release has an item that reads "add mosh and mosh-256color -TD". Indeed, on a recent Debian system /usr/share/terminfo/m/mosh and /usr/share/terminfo/m/mosh-256color exist. I have no idea what or who instigated this, perhaps someone from the mosh project?

However, mosh in src/frontend/mosh-server.cc seems to be setting the terminal to xterm/xterm-256color. Should this be changed?

@achernya
Copy link
Collaborator

achernya commented Apr 16, 2023

To the contrary this is a bug in ncurses. We need to ask them to remove a terminal definition, as we never asked them to ship a terminfo for us.

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