Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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  
share|improve this question

8 Answers 8

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@

share|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

In your home directory, put in the file .screenrc the following text:

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

Works for Terminal.app too.

share|improve this answer
1  
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
1  
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 '12 at 16:02
    
Also works for me in OS X Lion 10.7.5 (Note: There is a slight typo in the answer; the file you need to store the command in is ~/.screenrc, that is, in your home directory, in a file named ".screenrc" -- not "screenrc". I've edited the answer now to reflect this.) –  likethesky May 21 '13 at 5:52

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

termcapinfo xterm* ti@:te@

This would be evan more universal. It's legal:

termcapinfo * ti@:te@
share|improve this answer
    
This is the best answer imho. –  Steve Bennett Apr 18 at 1:12

Old thread I realize, but for what it's worth:

If using a correctly-configured iTerm2 on Mac OS X Mountain Lion 10.8.2, it appears it's not necessary to also create/edit a .screenrc file, as per Gareth's helpful suggestion above.

  1. Install iTerm2-1_0_0_20120726

  2. Launch iTerm2 > Profile menu > Open Profiles > select Default > Edit Profile > Terminal tab > Tick ON:

    • Save lines to scrollback when app status bar is present
    • Unlimited scrollback (optional)
  3. Restart iTerm 2 (or start new shell)

  4. Test it: Personally I SSH'd to Ubuntu 12.04.1 LTS on AWS EC2 > started byobu (already configured to use screen, rather than the default tmux) > Scrollback works fine now (plus, iTerm's mo bettah than Terminal anyhow..)

-dk

share|improve this answer
    
That is amazing!! –  HaxElit May 12 at 17:39
    
@David Keenan So glad you posted this solution! –  ivan Jun 22 at 20:29

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.

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

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.

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

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 ?

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

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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