OSX 10.6.3 Terminal.app

Am a pretty dedicated screen user. Terminal.app line buffer and/or scroll does not seem to work for me. That is while in screen anything that goes past the top of the frame is gone, can't scroll back to. This seems to work ok in other terminal apps gnome, cygwin. Perhaps this is a shell env, config, or command?

.screenrc:

startup_message off  
autodetach on  
shell -$SHELL  
vbell off  
defutf8 on  
caption always  
caption string "%{= wk}%w"  

I have tried using defscrollback here with different values, but doesn't have an effect.

some .bashrc settings:

set -o physical  
export TERM=xterm-color  
shopt -s checkwinsize  
link|improve this question
feedback

7 Answers

In screenrc:

# Make xterm scrolling work properly with screen.
termcapinfo xterm-color|xterm|xterms|xs|rxvt ti@:te@

Works for Terminal.app too.

link|improve this answer
Thank you so much ! That's perfect ! – Studer Aug 6 '10 at 13:12
2  
I know this worked in Snow Leopard, but doesn't appear to work in OS X Lion. Bummer :( – Tim Harper Jul 1 '11 at 23:17
This was just what I was looking for - working for me in OS X Lion 10.7.3 with Terminal.app - fantastic! – dossy Apr 6 at 16:02
feedback

In Lion, the default terminal type is different, so you should use this line in your .screenrc instead:

termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@

link|improve this answer
Thanks! This makes the trick to work on Lion. – Alexandre L Telles Aug 1 '11 at 13:59
This doesn't work for me :( "echo $TERM" returns "xterm-256color", so I'm sure it's the right terminal value, but no value I provide takes effect. – Tim Harper Sep 15 '11 at 22:20
feedback

I think it should works as well, even more universal:

termcapinfo xterm* ti@:te@
link|improve this answer
feedback

I don't know if it's possible to get Terminal's scroll buffer to collect and work with gnu screen's scrollback.

I recommend that you read more about the scrollback within screen itself. You'll need to learn a few new key combinations -- since you're already using screen, I doubt that will scare you off.

With a little help from Google, I found a blog post called Working with the Scrollback Buffer.

I didn't really expect that the scrollback would ever integrate with Terminal.app's buffer. If you switch from one virtual screen to another, what happens to Terminal's buffer? If you disconnect from one machine and reconnect three hours later, your Terminal buffer is long out of sync.

screen is my little window into another server. I like that screen's scrollback buffer persists with the session so that I have access to it from where ever I connect. I like that each screen within my session has its own scrollback buffer.

I think you found this working in gnome and cygwin because screen uses xterm's 'alternate screen' functionality. There's more discussion of this in the first question on this screen faq page.

link|improve this answer
thanks, great info. yes, copy mode is very much vim-like, I like. :) – rustychains Apr 5 '10 at 22:14
feedback

If you go to the Terminal menu and select Preferences... then click on the window tab at the bottom there are options for Scrollback, is the radio button for Unlimited selected ?

link|improve this answer
unlimited is selected – rustychains Apr 5 '10 at 22:15
feedback

Short answer:

Type crtl-a + [ and use your scroll/arrow keys or pgup/pgdwn. To exit the "scroll-mode" (not the actual name), press Esc

Long answer: This this article about screen's scrollback buffer.

link|improve this answer
please comment on the down-vote. – lajuette Aug 7 '10 at 8:58
feedback

I use iTerm 2. There is an option under profiles>terminal which states: "Save lines to scrollback when an app status bar is present". That and putting:

defutf8 on
termcapinfo xterm-color|xterm|xterms|xs|rxvt ti@:te@

in screenrc did the trick for me. Scrolling!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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