[mosh-devel] $TERM Environment Variable

John Terenzio john at terenz.io
Mon Jun 18 10:47:12 EDT 2012


Hi,

I'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 ("screen-256color") 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 "screen". With SSH, nothing would
happen on the remote host, but with Mosh I'll get nested Tmux sessions
because the remote host doesn't know it's already inside Tmux (it sees
"xterm-256color").

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'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't robust enough. If you tell me your thoughts on fixing it I'm happy to
submit a pull request.

Thanks!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/mosh-devel/attachments/20120618/6b784ef0/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: term.patch
Type: application/octet-stream
Size: 748 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mosh-devel/attachments/20120618/6b784ef0/attachment.obj


More information about the mosh-devel mailing list