Hi,<div><br></div><div>I&#39;ve been enjoying using Mosh but I have a small issue with the $TERM variable. My use case is that I run Tmux locally, then inside that session I connect to another server with Mosh. Before, when I used SSH, my $TERM variable from inside Tmux (&quot;screen-256color&quot;) would get forwarded to the remote host. I have my computers set up so that Tmux starts automatically if the $TERM variable does not start with &quot;screen&quot;. With SSH, nothing would happen on the remote host, but with Mosh I&#39;ll get nested Tmux sessions because the remote host doesn&#39;t know it&#39;s already inside Tmux (it sees &quot;xterm-256color&quot;).</div>
<div><br></div><div>I patched my copy of Mosh by removing the lines that set the $TERM variable, which make it just inherit the current one (diff attached). This works for me and I don&#39;t see a downside to it, but I also thought about adding a command line switch to override the $TERM variable if what I did isn&#39;t robust enough. If you tell me your thoughts on fixing it I&#39;m happy to submit a pull request.</div>
<div><br></div><div>Thanks!</div><div>John</div>