GNU bug report logs - #24039
24.5; emacs shell doesn't work with mosh

Previous Next

Package: emacs;

Reported by: Nico Schottelius <nico.schottelius <at> ungleich.ch>

Date: Wed, 20 Jul 2016 15:56:03 UTC

Severity: minor

Tags: notabug

Found in version 24.5

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24039 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Nico Schottelius <nico.schottelius <at> ungleich.ch>
Cc: 24039 <at> debbugs.gnu.org
Subject: Re: bug#24039: 24.5; emacs shell doesn't work with mosh
Date: Wed, 20 Jul 2016 22:10:04 +0200
Nico Schottelius <nico.schottelius <at> ungleich.ch> writes:

> Starting M-x shell and afterwards entering "mosh mymachine" results into
> mosh crashing with:
>
> mosh-server: terminalframebuffer.cc:73:
> Terminal::Framebuffer::Framebuffer(int, int): Assertion `s_height > 0'
> failed.
>
> I suspect that the window height is not being exposed in a standard
> terminfo way to be consumed by mosh.

Emacs' `shell' sets $TERM to "dumb", which isn't what mosh expects. Try
"M-x ansi-term", and call "mosh mymachine" from there. This works, at
least for me.

> Furthermore escapes from bash and zsh are displayed as
>
> [J[16:58] wurzel:~% [?2004
>
> (where wurzel is my hostname and 16:58 is the time)

Same reason. Teach your .profile or .bashrc or .zshrc not to use escape
sequences. Use something like this:

if test $TERM = "dumb"
   # set prompt w/o escape sequences
else
   # set default prompt
end

Best regards, Michael.




This bug report was last modified 8 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.