Mac os x Terminal.app's buffer and screen command

10,779

Solution 1

To expand on the previous two answers: the .screenrc line

termcapinfo xterm* ti@:te@

will turn on your scrollbars. This is a win unless you're using control-A to switch between multiple screen sessions in the same Terminal window. Screen uses what's called cursor addressing mode to keep a separate history buffer for each session; the termcapinfo line above tells it never to use that mode. All history then goes into one buffer, the native Terminal buffer, and you'll see lines from all sessions mixed in with each other.

These days that just means using a separate Terminal window (or tab) for each login on your remote -- a low price to pay for getting your scrollbars back, to my mind.

So why isn't scrollbar mode the default? Because in Ye Olde Tyme Dayes when we walked twenty miles in the snow to our 80 by 24 character-cell VT100s, you could only get one login per terminal. Unless you had two terminals on your desk, screen was the only multi-session game in town.

Solution 2

Adding the following to ~/.screenrc should do what you want.

termcapinfo xterm* ti@:te@
Share:
10,779
Arvind
Author by

Arvind

Software developer, passionate on C++, Java coding and learning new technologies.

Updated on June 03, 2022

Comments

  • Arvind
    Arvind almost 2 years

    I use Mac os x Terminal.app to connect to my remote machine and then use screen on that machine.

    Is there a way to use the scrollbars on Terminal to scroll back and forth on the screen's buffer. It is painful to do ctrl+a + Esc and then Page Up/Down

    Thanks Arvind

  • cerberos
    cerberos about 12 years
    I have this problem in lion, this does fix the problem but means that I have to edit ~/.screenrc on each remote machine I use. On snow leopard I could page up in screen on any machine without doing anything special, I'd love to know how to do that in lion.
  • natevw
    natevw about 9 years
    This is great, but unfortunately does not work when using screen to connect directly to a tty device (e.g. noah.org/wiki/Screen_notes#using_screen_as_a_serial_terminal‌​) — any idea why not?
  • meatspace
    meatspace about 8 years