Howto? Integration of scrollback buffer when using screen?

1,023 views
Skip to first unread message

Ed W

unread,
Mar 19, 2011, 3:21:17 PM3/19/11
to iterm2-...@googlegroups.com
Hi, I'm hoping to switch from Terminal.app to iTerm2, but I can't figure
out how to get scrollback integration with iTerm when using screen?

So the situation is that as soon as I start screen with a hardstatus
line configured, then iterm no longer captures the scrollback window.
Basically all I can see is the screen window itself. However, if I
disable the hardstatus then I get integration with the scrollback window
and so I can scroll up and see past output

This all works fine in Terminal.app

My screenrc config has something like this:

backtick 1 0 0 /usr/local/bin/cpuusage
hardstatus alwayslastline
hardstatus string '%{= kG} %{G}%H %{g}[%=
%{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}] %1`%%
CPU %{W}%c %{g}'

termcapinfo xterm|xterms|xterm-color|xs ti@:te=\E[2J


Any ideas on what I can do to get scrollback working with iterm & screen
hardstatus please? It doesn't seem to be specific to what's in the
hardstatus line, and probably there is some termcap line needed to fix
things, but no idea what...?

And yes, I am aware of the screen scrollback buffer, but I much prefer
the gui scrollback window for simple needs

Thanks for any help

Ed W

P.S. It would also be nice if the "activity monitor" had some
configuration to ignore changes in the hardstatus line? Kind of means I
would need to turn off anything which regularly updates
(uptime/clock/cpu) if I want to use this feature.

George Nachman

unread,
Mar 19, 2011, 5:05:35 PM3/19/11
to iterm2-...@googlegroups.com, Ed W
Hi Ed,

Thanks for pointing this out. I don't use screen, so I wouldn't have noticed. The problem was that screen defines a scroll region and we weren't adding lines to the scrollback buffer in that case, but it can be done safely when the region starts at the top of the screen. I submitted a fix at r694, and it'll be in the next nightly build.

-G

Ed W

unread,
Mar 20, 2011, 4:40:36 AM3/20/11
to iterm2-...@googlegroups.com

Very interesting - thanks

Could perhaps another heuristic be that if the scroll region is nearly
the entire screen except for say the bottom X lines, then the "changed"
bell/tab/growl will ignore stuff outside the scroll region?

The idea would be to ignore the status bar in screen and perhaps similar
apps (tmux, mutt, whatever) and focus only on changes in the content area?

Thanks again!

Ed W

George Nachman

unread,
Mar 23, 2011, 1:59:57 AM3/23/11
to iterm2-...@googlegroups.com, Ed W
Interesting idea...please file a feature request for it. It'll be hard to do, though, because every app may behave differently. The trick will be dealing with unexpected consequences.

ronnocol

unread,
Apr 29, 2011, 2:22:31 AM4/29/11
to iterm2-discuss
Is there a way to make this an option?

I use a screen session for IRC and having it use the iTerm scrollback
buffer instead of the screen scrollback buffer is a bit annoying.

Regards,
Lance.

George Nachman

unread,
Apr 29, 2011, 12:08:31 PM4/29/11
to iterm2-...@googlegroups.com
Try this: Go to prefs->profiles->terminal and disable Save lines to
scrollback when an app status bar is present.

jamgill

unread,
May 5, 2011, 11:30:30 AM5/5/11
to iterm2-discuss


On Mar 19, 3:21 pm, Ed W <li...@wildgooses.com> wrote:

> And yes, I am aware of the screen scrollback buffer, but I much prefer
> the gui scrollback window for simple needs


I have the opposite view, I like to use the scrollback buffer in
screen(1) ... but in iTerm2 the key sequence "ctrl-a, ctrl-esc"
fails. It appears that iTerm2 is not passing the ctrl-esc sequence to
my session.

I just installed iTerm2 and started using it today, so my configs are
largely stock (mostly color tweaks). Is there something I can do to
verify this is what is happening, and a way to correct it?

Thanks!
--jg

George Nachman

unread,
May 9, 2011, 2:47:57 PM5/9/11
to iterm2-...@googlegroups.com
I don't think ctrl-esc is supposed to send, but you can find out by running cat and pressing ctrl-esc. If it sends something other than esc in the terminal you have used it in before, let me know.
Reply all
Reply to author
Forward
0 new messages