-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mosh prevents the use of scrollback #122
Comments
Thanks. The're a compromise here between skipping frames for speedy terminal support and wanting to have everything sent to the local terminal, and mosh picks a particular (not necessarily perfect) point on that spectrum. The workaround for now is to run "screen" or "tmux" on the remote end and use that for scrollback. |
I realise this is a closed issue, but not seeing all the output of a command is a real blocker for me. If I run a command I need to see all the output, having to load up screen or tmux with it's non-native scroll support doesn't really work. Is there no way we could set an option for not discarding all the output? |
I understand why this is closed -- mosh doesn't actually send the stream to the client, so dumping all but the last screen is correct behavior. I would love an option to have an extended "screen" which included X lines of scrollback, but that's more of a feature request, and is hard. |
We are working on this for mosh 1.3 and will try to do the most pleasant thing possible. You can follow this issue at #2. |
Without seeing the output, I don't know what my command did. This is completely unacceptable, especially without any warning. I will not use mosh again. |
Since #2 is now closed, and this issue was not affected, can this possibly be reopened? |
This comment has been minimized.
This comment has been minimized.
It's been about a year now that I have my eye on mosh waiting for this feature to be implemented. I think mosh could become an essential tool -- but not until this works. Let's face it: without scrollback it's pretty useless in the real world (except when you are trapped in a lift maybe). |
Scrollback is essential in everyday use. I was about to make mosh my primary tool for remote work but as I discovered this flaw I'm back to ssh. I might consider getting back to mosh when working in extremely poor networking conditions but giving up scrollback for the possibility of having single ssh session at work, commuting and at home is not an option. |
I just noticed this as an issue, but using gnu-screen isn't a big deal for me. Maybe I'll look into tmux or something too. Some resources for those of you not familiar. Getting multiple windows out of one SSH session is a pretty good feature anyway for those of you not using it. http://www.howtogeek.com/58487/how-to-easily-multitask-in-a-linux-terminal-with-byobu/ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I guess that the scrollback does not need to be as fast as the actual terminal, so |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
+1 - This issue is also preventing me from using mosh 100% of the time. Do any shells/terminal programs exist with APIs to deal with native scrolling? Perhaps something to get the ball rolling in this case would be a proof of concept for an easy client, instead of searching for the general solution for every shell |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Even if this is implemented, you’re most likely not going to get native scrollback. Native scrollback would require sending all the scrollback data to the local terminal in sequential order, which would totally erase Mosh’s features of graceful packet loss handling and working Control-C. If you don’t want Mosh’s features, you might as well just use SSH. The plans we’ve discussed (see #2) involve adding new Mosh-specific key bindings to access a dynamically loaded server-side scrollback buffer, similar to what you can already achieve by running As far as I’m aware, no code has been written (and repeating “+1” over and over isn’t going to magically cause code to become written). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@RipperSK The root cause of not able to scroll is caused by |
This comment has been minimized.
This comment has been minimized.
This is not true. The root cause is that the mosh model is fundamentally incompatible with a scroll-back buffer managed by your local terminal.
The drawback is that your local scrollback might be "incomplete". For example, try Edit: If you have any questions about this, feel free to join our IRC channel ( |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi all, I am marking the above comments as "off topic". I want to reiterate a few things:
Thanks all |
This comment has been minimized.
This comment has been minimized.
Use case: After working from location with a high speed Internet took the laptop and moved to bus. btw: tmux is another - this require exchange with a remote side. |
Unfortunately the problem here is not network communication, but rather mosh's construction of being a terminal emulator. Native scrollback requires not just a reliable channel, but also not being a full terminal emulator. This issue is marked as a feature request and remains open in the mosh bug tracker slated for some future milestone. This means that the mosh team has an interest in working on this, but is not committing to a timeline for its completion. To folks that are interested in this feature: we're interested in proposals to fix this and PRs to do so, but please don't comment on this issue attempting to motivate the use case further. Rest assured that you've been heard -- feel free to 👍 up the top comment to express your support. |
(emphasis mine) I'm not sure this is strictly true? Specifically, as far as I'm aware it's more a matter of what specific terminal one is emulating. For example, the VT520 has a "desktop feature" to "Review previous lines"; this keeps a "Review Previous Lines Buffer", which (quoting section 2.8.3 of the EK-VT520-RM document (PDF)) behaves as follows:
As far as I can tell, this functionality provides perfect license for a VT520 emulator to provide a line-by-line scrollback buffer. I've not yet gone digging enough to tell when such functionality was first introduced (i.e. whether it predates the VT520). At that point, emitting lines from said buffer into the client environment is merely a matter of the emulator's choices regarding platform integration. As for the first half (reliable channel), I'm not convinced of that either: in particular, the visible portion of the scrollback buffer could be the "synchronized state", while the scrollback buffer itself could be "server-private state". At that point, you no longer need a reliable channel either. This would relax the "local" part of scrollback buffer, but could possibly recover it by remembering what had already been filled from the terminal-emulation scrollback buffer into the local scrollback buffer, and backfilling via range requests. However, in order to survive unbounded periods of connectivity loss, this would require an unbounded server-side buffer. |
The problem is not the VT520 that mosh emulates. The problem is the outer terminal requires a line-oriented output, of every single line. If you want "native scrollback", then mosh needs to deliver, reliably, every single event that happened server-side to the client's outer terminal. The scrollback buffer can't be synchronized in the way you describe because the scrollback buffer is part of the outer terminal. There are no events (to my knowledge) that the outer terminal sends to mosh to generate scrollback; that's why things like screen and tmux have their own scrollback mechanisms. What you're asking for essentially amounts to making a "moshterm" GUI program. |
As far as I have understood mosh implementation uses two buffer: one on client and one on server side and the sync mechanism is using a diff/patch of both buffers to keep in sync. So I wonder if it is not possible to implement a scrollback by pages simply by setting the buffer size by multiplying the size of the buffer by an integer in order to make the buffer represent a finite number of full pages for the current terminal and interpret keys to change page by page or line by line. Like it the sync mechanism continue to do is job and a simple offset applied permit to display the scrollback. The drawback is that won't work at all if you resize the terminal but actually mosh doesn't handle it too for its buffer so I don't think it is a real problem any way. It is a similar that the way used for old school vertical bitmap scrolling where you simple change offset of the video memory pointer on a virtual screen more higher than real screen. |
No solution was found possible for this I guess ? as I've read @achernya's latest comment right ? Maybe this feature is simply not possible and we should use screen/or any other terminal multiplexer for scrollback buffer ? |
If I use mosh to connect, and then run a command with a lot of output, e.g. ps, my scrollback buffer doesn't get any of the overflow. This is sad-making -- I don't always know when a command will produce a lot of output, and, additionally, I like scrollback for seeing previous commands' output.
The text was updated successfully, but these errors were encountered: