How to scroll back in screen within a ssh session from OS X? [closed]

I do the following:

  1. Open Terminal.app
  2. Open a ssh session to a remote Linux server
  3. Open a screen session on the server
  4. Start a program who breaks with many lines of error reporting…

How can I scroll up to read that?

And no, fixing the program is not a solution for now…


Solution 1:

You can modify .screenrc to allow mouse-based scrollback:

http://slaptijack.com/system-administration/mac-os-x-terminal-and-gnu-screen-scrollback/

Solution 2:

If you did a man screen you can see the options available.

When in screen you can do the following: CTRL+A (release), [

You can then use the arrows to scroll around the window. To get out of scrolling you can do a CTRL+C.

Solution 3:

Nathan's got it right, though I've always been a fan of Ctrl+A + ESC. ESC is yet another way to get out of copy mode.

It is worth considering, however, that scrollback history has a size limit and if you really want to play it safe, it's generally better to either redirect output to a file (or pipe it to tee if you want screen output as well).

Solution 4:

Besides using the scroll-back buffer in screen, Terminal.app may respond to Shift-Page Up (perhaps Shift-Fn-Up-Arrow on a MacBook).

Another option would be something like:

your_prog 2>&1 | less