mobile-shell / mobile-shell/mosh

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

Open
#1,064 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the corruption with mosh and irssi on the listed Debian setup, then compare it with SSH and review issue #1041. Start by tracing mosh's terminal capability and TERM handling around ncurses/REP; done means irssi renders correctly without garbage or an unfilled status bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.