Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > no screen scrollback in Terminal

no screen scrollback in Terminal
Thread Tools
JNI
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
Aug 23, 2004, 04:01 PM
 
I've recently gotten hooked on screen. I've used emacs a lot, especially to have multiple shells running in the same window, splitting windows and as a development IDE. But I like the lightweight nature of screen for more general purpose terminal use.

Problem is I can't get screen to preserve a scrollback buffer. E.g. if I do an ls -al where there are dozens of files and some of the listing scrolls out of the window, using the Terminal scrollbar doesn't show me the parts that have scrolled off. I know I can pipe the results through more, but I wish it just worked the way a non-screen'd shell normally allows scrollback in Terminal using the scrollbar.

I've tried setting the defscrollback setting to 1000 in my .screenrc, but it doesn't seem to change anything.

Any suggestions for getting scrollback working? Is there something I can change in my term settings?
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Aug 23, 2004, 05:00 PM
 
Read more of the screen manpage... try Ctrl-a Esc to enter scrollback/copy mode. Press Esc again to exit s/c mode.

Now I just tested the above in Panther (10.3.5) and Terminal.app still doesn't do it right. A real xterm (xterm in X11) does it just fine.

I also would be interested in finding out why Terminal.app doesn't work with screen correctly.
-DU-...etc...
     
JNI  (op)
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
Aug 23, 2004, 08:17 PM
 
Yeah, I can do the scroll/copy mode thing, but it's just not what I'm looking for - it's modal, a bunch of extra awkward keystrokes, doesn't work with my scroll wheel, arrow/page keys etc. etc.

At least you've confirmed it isn't unique to my machine. Hopefully some termcap wiz will chime in and let us in on some magic tty settings. Thanks anyway for the effort.
     
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Aug 24, 2004, 09:13 AM
 
Screen rocks. Detaching and reattaching processes is the best idea ever for command line operating systems. I do have this problem too with screen and the scrollback buffer and it does bug me too, though I kinda just take it as a feature of using screen so I don't even try to scroll anymore.

I mainly use irssi in screen, in which I can use option-p and option-n (when option is set to emulate the meta key in the "Keyboard" section of the window settings in Terminal.app) to scroll up and down through the buffer.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
Fresh-Faced Recruit
Join Date: Sep 2002
Location: Sydney, Australia
Status: Offline
Reply With Quote
Aug 24, 2004, 06:58 PM
 
hi,

had this problem a while ago (on the upgrade from 10.2 to 10.3), and i think the fix is the termcap. i have the terminal.app preference for "declare terminal type" set to "ansi", which i believe fixed the problem. i also seem to recall an entertaining series of starts/quits to convince the terminal that i really meant it.

hope this helps.

cheers,

samthecat
     
JNI  (op)
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status: Offline
Reply With Quote
Aug 26, 2004, 08:06 PM
 
Hmmm. Changing the term type to ansi helped a little bit, but it's still problematic.

If I do a long listing in one virtual screen, scrollbar scrolling seems to work, at least at first. If I go to a second virtual screen and do anything that outputs, then go back to the first screen, the output of screen #2 seems to be merged into the scrollback buffer of screen #1.

That's a bit better than it was. At least if I am in one screen and get a long listing, as long as I don't go to another screen everything will be OK for scrollback. That will work for many cases. But it's a problem if I have, say, one screen doing a long compile with lots of output, then move to another screen to do some cvs diffing etc, then go back to monitor status of the compile.

Thanks for the incremental help. Oh well, maybe it will get better in future releases...
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Aug 26, 2004, 09:16 PM
 
Taking a look through the screen manpage. Same info is here. You can establish a separate scrollback buffer for each virtual window created by using scrollback num . I've not experimented with screen manager up until now but will becuase it looks like an excellent tool.
Craig
     
Fresh-Faced Recruit
Join Date: Sep 2002
Location: Sydney, Australia
Status: Offline
Reply With Quote
Aug 27, 2004, 05:09 AM
 
hi JNI,

i don't think that the scrollbar in terminal.app will ever only scroll through one screen session. that would entail apple interfacing with the screen programme, and paying attention to which screen you actually are viewing. i think that this is unlikely, so, jumbled screens will always be in the terminal.app scrollback. this is actually the same as the scrollback buffer in aterm (and, i would assume xterm/rxvt/etc).

if you want to be able to go back through only one screen session, i believe that you will have to use the screen built-in function, as utidjian described. i used that for a little while, and re-mapped the pgup/pgdn keys to send ctrl-b/ctrl-f (or whatever the appropriate up/down keys are in screen), so all i needed was to press ctrl-a <esc> to enter the mode, and then use the keys.

cheers,

samthecat
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:39 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2