Re: Help understanding changed terminal behavior in Leopard?
Re: Help understanding changed terminal behavior in Leopard?
- Subject: Re: Help understanding changed terminal behavior in Leopard?
- From: Jonathan Gold <email@hidden>
- Date: Fri, 17 Oct 2008 13:59:33 -0700
Mike --
Thanks a lot for your response -- nice to know it's not *just* me.
I followed your steps below, and didn't get any success from Terminal.app using
xterm or dtterm.
I fired up xterm under X and confirmed that my output from infocmp is exactly
what you've got below. I enabled (it actually was already) the alternate screen
mode, and am seeing something that is still a little puzzling to me: if I
have alternate screen switching enabled, and run a command and then open a file
with less and jump around within less and then page up through the xterm buffer
(using shift+pgup in xterm), I don't get the artifacts from less as I did under
Terminal.app, but I do lose the last 24 lines of output from the previous
command.
I'm not sure if I'm describing it correctly, but it's like the last 24 lines of
output are buried underneath 'less'.
Here's a one-liner test script I've been using to simulate my workload. It
prints some numbered lines to a file, cats them to the console (simulating my
compiler), then opens that same file in less (simulating my editor). I run this,
page around a bit in less (using ctrl-f or pgdn), then try and page up through
the buffer using shift+pgup. The last line of output I get is line 977, which
confirms that the last 24 lines of output are "behind" or "under" less:
ruby -e 'File.open( "/tmp/numbered", "w" ) { |io| 1000.times { |i| io.puts( "This is line #{i}, TERM=#{ENV[ "TERM" ]}" ) } }' && cat /tmp/numbered && less /tmp/numbered
Any idea what I'm doing wrong?
Thanks again for your help,
jon
On Fri, Oct 17, 2008 at 12:47:42PM -0500, Mike Sliczniak wrote:
> Hi Johnathan,
>
> Terminal.app in Leopard is a much poorer terminal emulator in Leopard than it was in Tiger for various reasons.
> Basically it added tabs (perfectly useless due to the screen program) and took away the horizontal spilt that worked
> with the alternate screen while breaking many emulation features.
>
> What you are looking for is emulation of 'alternate screen' and I think this is one of the features that disappeared in
> the Terminal.app in Leopard. Due to other bugs in Terminal.app I have to set the TERM enviroment variable to dtterm to
> get various programs to redraw correctly so i am not 1005 sure that the alternate screen feature is missing but it most
> likely is. Try setting your terminal emulation in the prefs to xterm.
>
> On my system with TERM set to xterm and the default terminfo files xterm running under X11.app supports the alternate
> screen correctly. In fact by default if you ctrl middle click the xterm you get the VT menu and the last option toggles
> the screens.
>
> You can verify that you have this sanely in your terminfo files with this command:
>
> $ infocmp xterm | grep '[rs]mcup'
> rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>,
> sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
>
> Look for rmcup and smcup to not be empty.
>
> Also tput smcup should put you into the alternate screen and tput rmcup should get you back (if you have term set
> correctly and your terminal emulator configured right which xterm is by default).
>
> I hope that gets you on the right track and personally I would abandon Terminal.app.
>
> mzs
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> X11-users mailing list (email@hidden)
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden