33

I am using a mac (snow leopard). I am a ruby on rails developer and I watched a screencast on GNU screen and am trying it out. So far I like it.

On a window when I start server I get to see the log messages. However I can't seem to scroll up. I do get a scroll bar. However when I use the scroll bar and scroll up I don't see anything.

How do people use GNU screen and scroll up?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Nadal
  • 979

5 Answers5

44

There's a 'copy mode' in screen, activated by pressing, Ctrl + A, followed by [. This gives you a cursor that you can use to scroll backwards.

clhy
  • 6,514
Babu
  • 1,347
17

Add the following to your ~/.screenrc:

termcapinfo xterm ti@:te@
termcapinfo xterm-color ti@:te@

This will let you use the Terminal.app scrollbar instead of relying on screen's scrollback buffer.

9

The correct way is to use the copy mode, as Babu pointed out.

You could speed things up a bit by automatically entering into copy mode when you press your favourite scroll keys.

For example, using PgUp and PgDown:

# easier scroll
bindkey "^[[5~" eval 'copy' 'stuff ^b'  # PgUp   | Enter copy/scrollback mode and page up
bindkey "^[[6~" eval 'copy' 'stuff ^f'  # PgDown | Enter copy/scrollback mode and page down
lgaggini
  • 306
7
  • I use Ctrl+A Esc to go in copy mode.
  • Then use arrows or PageUp/PageDown to move through the scroll buffer.
  • To exit copy mode, just hit Esc.

that’s a little more intuitive by this way.

TeChn4K
  • 171
6

Take a look at GNU Screen: Working with the Scrollback Buffer for a good introduction.

Doug Harris
  • 28,397