Re: Uninitialized tty size in xterm
Re: Uninitialized tty size in xterm
- Subject: Re: Uninitialized tty size in xterm
- From: David Borman <email@hidden>
- Date: Mon, 31 Aug 2009 16:51:29 -0500
Hi,
Just a quick follow-up, since I've been doing some debugging and
having some discussions on this topic off-list. The evidence is that
something has changed in the pseudo tty initialization between Leopard
and Snow Leopard, such that even though xterm sets the sizes before
forking off the child process, in the child process as part of
attaching to the tty the sizes get set back to "0 0".
The good news is that there is a quick workaround, in ~/.Xdefaults add:
xterm*ptySttySize: true
which will turn on the logic in xterm to reset the sizes in the child
after doing the terminal initialization.
Dealing with terminal initialization was a pain 20 years ago, and in
this area the xterm sources are as convoluted now as they were back
then. :-)
-David Borman
On Aug 29, 2009, at 5:38 PM, David Borman wrote:
Hi,
I've upgraded to Snow Leopard. I've been using the X11 icon in my
doc for some time to start up X11; it runs my .xinitrc which starts
up two xterm windows, and then I also get the default xterm window
from starting X11. That's all fine.
What I've noticed is that sometimes "vi" isn't getting the screen
size correct, e.g., in my 33 line xterm window it came up with a 24
line scrolling area. But at other times it seems to work just
fine. So I did some more investigation, and discovered that the tty
size settings are not getting initialized. When I first open an
xterm window:
% stty size
0 0
%
But if I resize the window, it gets fixed:
% stty size
33 80
%
and then "vi" works just fine.
It doesn't matter whether the xterm is started from my .xinitrc, the
default xterm window when X11 starts, an xterm from the X11
Application menu, or just a manual start of "xterm &" from another
window. In all cases, until the window is resized, "tty size"
reports "0 0".
Are other folks seeing this same issue? If not, any ideas on what I
could check in my environment to see why I'm seeing this problem?
Thanks,
-David Borman
_______________________________________________
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