You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current situation is that mosh will manually test for color support using terminfo, which makes sense, but then it only checks to see if the value is 256 or not. If it's 256, it sets xterm-256color and if not, it sets xterm:
This is a problem when terminals support truecolor and correctly advertise that they support 16M colors via terminfo, e.g.
$ tput -T alacritty-direct colors
16777216
In this scenario, mosh says, "Well.. it's not 256 so I guess it's 8," and then sets TERM=xterm. Then everything that is run inside the session, including tmux, thinks that not even 256 colors are supported, let alone 16M colors. It would be great if COLORTERM=truecolor were sufficient, but unfortunately it's not. There are too many applications that only look at $TERM (via terminfo) and are thus broken :(.
The text was updated successfully, but these errors were encountered:
Since there seems to be an unspoken convention of reporting 256 colors even when you support more than 256 colors, perhaps the best thing to do is simply colors >= 256 instead of colors == 256.
The current situation is that
mosh
will manually test for color support using terminfo, which makes sense, but then it only checks to see if the value is 256 or not. If it's 256, it setsxterm-256color
and if not, it setsxterm
:mosh/src/frontend/mosh-server.cc
Lines 572 to 578 in 1105d48
This is a problem when terminals support truecolor and correctly advertise that they support 16M colors via terminfo, e.g.
In this scenario,
mosh
says, "Well.. it's not 256 so I guess it's 8," and then setsTERM=xterm
. Then everything that is run inside the session, includingtmux
, thinks that not even 256 colors are supported, let alone 16M colors. It would be great ifCOLORTERM=truecolor
were sufficient, but unfortunately it's not. There are too many applications that only look at$TERM
(via terminfo) and are thus broken :(.The text was updated successfully, but these errors were encountered: