Navigation Menu

Skip to content
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

Clear Scrollback (Mac OS X client, Gentoo Server) Display Issue #211

Closed
xironix opened this issue Apr 17, 2012 · 8 comments
Closed

Clear Scrollback (Mac OS X client, Gentoo Server) Display Issue #211

xironix opened this issue Apr 17, 2012 · 8 comments
Labels

Comments

@xironix
Copy link

xironix commented Apr 17, 2012

I am trying out mosh for the first time today and I tend to habitually clear the scrollback in my terminal. I've noticed that if I clear the scrollback and then issue a command, such as find ./, mosh will garble the results.

For example:

./.gemrc
./.bash_aliases
./.bashrc
./.Xauthority
./.bash_logout
./.bash_history
./.bzr.log
./.lesshst
./.key
./.bash_profile
./.systemtap
./.systemtap/cache
root@server:~ # 

Pressing command+k (clear scrollback in OS X terminal.app) and typing find ./ again results in the following output:

   gemrc
   bash_aliases
   bashrc
   Xauthority
   bash_logout
   bash_history
   bzr.log
   l sshst
   key
  .bash_profile
   systemtap
./.systemtap/cache
root@server:~ # 

The behaviour isn't even entirely predicable, as if I do it again for a 3rd, time, I get the following output:

roogemrc
  .bash_aliases
  .bashrc
   Xauthority
   bash_logout
./.bash_history
./.bzr.log
./.lesshst
./.key
./.bash_profile
./.systemtap
./.systemtap/cache
root@server:~ # 

I am using mosh from ports on OS X and the server is using mosh from Gentoo portage.

@keithw
Copy link
Member

keithw commented Apr 17, 2012

Thanks, we will fix this and provide good scrollback when we fix #2 (probably in mosh 1.3).

For now, the solution is to run screen or tmux on the server side, or use a pager like less to capture command output. 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.

@xironix
Copy link
Author

xironix commented Apr 17, 2012

Actually, I tested running screen on the server side and this issue persists. =(

It isn't so much as being able to go through the scrollback, but when one decides to clear the screen using command+k.

@DHowett
Copy link

DHowett commented Apr 17, 2012

I don't think this is necessarily a mosh issue. Clearing the screen using Command+K is an apple-specific addition, and destroys the contents of the terminal without communicating to the software running in the terminal that it has done so, by way of escape sequence. Control-L is accepted by most shells for clearing the screen in a proper terminal-compatible manner.

@keithw
Copy link
Member

keithw commented Apr 17, 2012

Ah, yes, DHowett is right that this is two separate issues. screen will give you a scrollback buffer that you can access with Ctrl-A ESC (PgUp/PgDown/arrow keys). (We are working to make awesome client-side scrollback in mosh but it won't be until 1.3 at the earliest.)

Command-K scribbles on the contents of the screen without telling the application; no fullscreen app will deal gracefully with this (whether we're talking about emacs, screen, pine, mosh, etc.). Control-L will repaint the screen from scratch in any of those programs, including mosh.

@keithw
Copy link
Member

keithw commented Apr 19, 2012

Closing as unfortunately unfixable. (Unless you type Control-L.)

@keithw keithw closed this as completed Apr 19, 2012
@mitar
Copy link

mitar commented Apr 30, 2012

Would there be a way to disable this full-screen behavior of mosh? I really like its IP address independence, but I do not really care about transfer optimizations when I am moving from WiFi hotspot to WiFi hotspot - I have enough bandwidth to simply transmit everything, I just do not like session loses. So similar to local echo, could also this be disabled?

@teamon
Copy link

teamon commented May 18, 2012

If you are using iTerm2 you can bind cmd_k to send HEX code 0x0C => http://cl.teamon.eu/1j381r0k431i0L0j0H3U/Screen%20Shot%202012-05-18%20at%2013.46.09.png

@keithws
Copy link

keithws commented Nov 25, 2013

After reading this thread, my solution was to use KeyRemap4MacBook to remap command-k to control-l in the Terminal.

Here's a gist of the XML I added to support this.

https://gist.github.com/keithws/7648530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants