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
{{ message }}
Repository navigation
Scrollback and alternate screen (was: Use alternate screen on smcup/rmcup ) #2
When the remote application uses smcup to enter the alternate screen, the client should put the real terminal in alternate screen mode too, so that for example the mouse wheel lets you scroll in less and emacs and barnowl.
Reacted by Matt Blais, Aleksei Zhukov, Santiago Castro, Pedro M. M. and Coenraad Loubser
Or perhaps the client should always put the real terminal in alternate screen mode, for much the same reason that curses applications do—the scrollback history it generates in the primary screen isn’t particularly useful anyway.
In normal use (like line-by-line typing at the shell), the real-terminal scrollback will be somewhat useful. I'm not sure I want to give that up completely, although maybe the user would be annoyed that larger prints are only there partially in the scrollback.
Hi, I would like to know if you have any plan on this issue? I think mosh should work just like ssh, that it will enter smcup mode when the remote application requests so. I find it quite annoying when I use vim to open a large file and it leaves a lot of scrollbacks.
(a) mosh-client puts the terminal in the alternate screen for the whole time
(b) mosh-server interprets SMCUP/RMCUP the way xterm does, so people's "vim" continues to work the same as in xterm (or in screen with altscreen enabled)
(c) we grab control-pgUp and control-PgDown for our own devious ends (providing proper scrollback).
Do I understand correctly that the plan here is to provide scrollback similar to what a regular terminal provides? That is, if I run a command with a lot of output, I can reliably scroll back with my terminal's scrollbars to see everything that was output by that command? That is a really important usability issue for me. Thanks!
Reacted by Matt Blais, Michael Curry, Andre Merzky, Lukas Martini, Manuel, steven, RedoX and exu-g
Yes, Scott, that's the plan, although you won't be able to use your local terminal's scroll bars. For now you can use screen or tmux on the server side to get this feature.
Reacted by Ron Wolf, Andre Merzky, Anton Dyudin and Marcus Howser
Why would it have to do the same thing? In principle Mosh should be able to keep a local copy of the scrollback buffer. I suppose there might be issues if something is spamming the terminal fast enough that the client doesn't receive all the text (since Mosh intentionally throttles screen updates to a fixed framerate). But that's solvable; Mosh would need some sort of algorithm to sync scrollback contents with the server, ideally with a lower priority than screen updates.
Reacted by Scott Weldon, RACZ Andras, George Hafiz, Billy Booth, Igor Seleznev, Lukas Martini and Martin Klimeš
Let’s bring this conversation back down from low Earth orbit, guys. The reason Mosh doesn’t support scrollback has nothing to do with philosophy. It also has nothing to do with whether this ticket is open or closed—there’s already a ticket open for scrollback, and it’s not this ticket, which was about alternate screen mode. It has everything to do with limited developer time. If you’ve read the Mosh paper, you’ll understand how the way Mosh prioritizes interactivity makes delivering usable scrollback a challenge, so it was left out of the initial implementation and nobody has had time to add it since. If we had infinite time to work on Mosh, a scrollback feature would likely be a priority. Nobody is stopping you from developing this functionality if you are interested, and as always, a well-designed, well-implemented pull request is likely to be accepted. But complaining on a closed issue isn’t going to make that happen any faster.
Reacted by Andrew Chin, Scott Weldon, Habib Alamin, ant cosentino, Holger Hoefling, Igor Seleznev, Greg Price, Genda1ph, Jonathan White, Konstantin K and 6 more
I am going to unlock the open issue about scrollback, since it's had a chance to cool off. However, please avoid commenting on that issue (or this issue) if there is nothing new to add. There are "reaction" buttons in github that can be used to express your interest (which don't spam the whole thread), and comments like "+1" aren't useful. We know this is a very important issue to some people and that running screen/tmux on the server isn't always a convenient or acceptable solution.
Comments about unix philosophy are interesting, but are definitely off-topic for this github issue tracker. (However, you're welcome to join our #mosh IRC channel on freenode to discuss such things).
Reacted by Scott Weldon, George Hafiz, Lukas Rypl, Billy Booth, Pierre-Samuel Le Stang, Denis Falqueto, Dex, Holger Hoefling, Mert Demir, Aleksei Zhukov and 37 more
Reacted by Scott Weldon, Jordan ERNST, Denis Falqueto, Holger Hoefling, Greg Price, A. Darius L., Ulysse Beaugnon, Ayton Meintjes, Vitaly Ostrosablin, Javier Hermosa and 5 more
Activity
andersk commentedon Feb 20, 2012
Or perhaps the client should always put the real terminal in alternate screen mode, for much the same reason that curses applications do—the scrollback history it generates in the primary screen isn’t particularly useful anyway.
keithw commentedon Feb 27, 2012
In normal use (like line-by-line typing at the shell), the real-terminal scrollback will be somewhat useful. I'm not sure I want to give that up completely, although maybe the user would be annoyed that larger prints are only there partially in the scrollback.
chingjun commentedon Apr 11, 2012
Hi, I would like to know if you have any plan on this issue? I think mosh should work just like ssh, that it will enter smcup mode when the remote application requests so. I find it quite annoying when I use vim to open a large file and it leaves a lot of scrollbacks.
keithw commentedon Apr 16, 2012
Here is the current proposed solution:
(a) mosh-client puts the terminal in the alternate screen for the whole time
(b) mosh-server interprets SMCUP/RMCUP the way xterm does, so people's "vim" continues to work the same as in xterm (or in screen with altscreen enabled)
(c) we grab control-pgUp and control-PgDown for our own devious ends (providing proper scrollback).
andersk commentedon Apr 16, 2012
Sounds reasonable to me. I proposed the following modifications to (c):
scottgifford commentedon Apr 23, 2012
Do I understand correctly that the plan here is to provide scrollback similar to what a regular terminal provides? That is, if I run a command with a lot of output, I can reliably scroll back with my terminal's scrollbars to see everything that was output by that command? That is a really important usability issue for me. Thanks!
keithw commentedon Apr 23, 2012
Yes, Scott, that's the plan, although you won't be able to use your local terminal's scroll bars. For now you can use screen or tmux on the server side to get this feature.
taralx commentedon Apr 23, 2012
This is a cool idea. Is it possible to support mousewheel too?
keithw commentedon Apr 23, 2012
Yes, if we do it with Anders's amendment, it will support the mouse wheel.
NickWoodhams commentedon Jun 6, 2012
haarts commentedon Jun 11, 2012
66 remaining items
rjurney commentedon Oct 1, 2019
How hard would it be to add a rollback to mosh? What is involved?
eminence commentedon Oct 2, 2019
If mosh ever learns how to do scrollback, I'm imaging that it would have to do the same thing, so I don't quite understand this complaint.
comex commentedon Oct 3, 2019
Why would it have to do the same thing? In principle Mosh should be able to keep a local copy of the scrollback buffer. I suppose there might be issues if something is spamming the terminal fast enough that the client doesn't receive all the text (since Mosh intentionally throttles screen updates to a fixed framerate). But that's solvable; Mosh would need some sort of algorithm to sync scrollback contents with the server, ideally with a lower priority than screen updates.
caruccio commentedon Jan 23, 2020
habibalamin commentedon Feb 27, 2020
rjurney commentedon Feb 27, 2020
rjurney commentedon Feb 27, 2020
andersk commentedon Feb 27, 2020
Let’s bring this conversation back down from low Earth orbit, guys. The reason Mosh doesn’t support scrollback has nothing to do with philosophy. It also has nothing to do with whether this ticket is open or closed—there’s already a ticket open for scrollback, and it’s not this ticket, which was about alternate screen mode. It has everything to do with limited developer time. If you’ve read the Mosh paper, you’ll understand how the way Mosh prioritizes interactivity makes delivering usable scrollback a challenge, so it was left out of the initial implementation and nobody has had time to add it since. If we had infinite time to work on Mosh, a scrollback feature would likely be a priority. Nobody is stopping you from developing this functionality if you are interested, and as always, a well-designed, well-implemented pull request is likely to be accepted. But complaining on a closed issue isn’t going to make that happen any faster.
JohanMollevik commentedon Feb 27, 2020
habibalamin commentedon Feb 28, 2020
eminence commentedon Feb 28, 2020
I am going to unlock the open issue about scrollback, since it's had a chance to cool off. However, please avoid commenting on that issue (or this issue) if there is nothing new to add. There are "reaction" buttons in github that can be used to express your interest (which don't spam the whole thread), and comments like "+1" aren't useful. We know this is a very important issue to some people and that running screen/tmux on the server isn't always a convenient or acceptable solution.
Comments about unix philosophy are interesting, but are definitely off-topic for this github issue tracker. (However, you're welcome to join our #mosh IRC channel on freenode to discuss such things).
geohuz commentedon Jan 25, 2021
ZenBerry commentedon Jul 5, 2024
marek22k commentedon Sep 27, 2026
The website says that the issue is being tracked here, but the issue is closed, and when I try to scroll, it doesn't work. What is the current status?