views:

1376

answers:

3

Hi,

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

+2  A: 

I do not think you will be able to use the terminal's scrollbar in screen, because the terminal only knows about the 80x25 or so sized portion, and the display caching is done in the screen process.

You could try to bind it to an easier combo, see the CUSTOMIZATION section of the man page.

Pozsár Balázs
+1  A: 

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

termcapinfo xterm* ti@:te@
Joe Martinez
+4  A: 

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.

Yarrow