13
votes

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…

1
  • I could be wrong, but I don't think linux TTYs hold any history, themselves. When you're on a console TTY, you can page back up by using Ctrl+PgUp, but I doubt that will work in your case. Terminal.app must be configurable to hold more than its default amount of history, though. (or is it too late for that?) Nov 26 '10 at 14:25
14
votes

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

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

1
10
votes

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.

2
  • +1 for that. Ignore my comment, I somehow managed to blank the part that mentioned screen... Nov 26 '10 at 14:44
  • @SmallClanger: Not only that, but the OP mentioned OS X, not Linux. Besides, on Linux, gnome-terminal and xterm, among others, have scroll-back buffers. Try shift-pageup. Nov 26 '10 at 15:20
6
votes

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).

1
  • The scrollback is adjustable, though, using the defscrollback option in .screenrc. I typically keep mine set to 5000 lines, but sometimes I bump it up a bit. Nov 29 '10 at 19:42
3
votes

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
1
3
votes

Ok, i got it:

Ctrl + A, ESC 

and then vim-like commands:

Ctrl + u or Ctrl + d
0
votes

Press Shift when scrolling the mouse ...

Not the answer you're looking for? Browse other questions tagged or ask your own question.