This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Resizing a terminal window


On 5/5/2010 8:28 AM, J. David Boyd wrote:
Thomas Wolff<towo@towo.net> writes:

Am 04.05.2010 16:03, schrieb J. David Boyd:
...

Locally, I can use the mouse to resize a window, and the $COLUMNS and
$LINES variables are automatically filled in.

On many remote xterm sessions, they aren't.

Does anyone have any idea where to start figuring out what is wrong, and
what I can do to correct it?

LINES and COLUMNS are legacy mechanisms which may serve as a
workaround if the system doesn't otherwise handle screen size changes
properly. They should not be needed on modern systems where the tty
driver maintains the information.
(You may note that mintty has not set them initially but they get set
on resize - by whatever means... - while in a cygwin console they are
not used at all.)
So if you happen to have these variables set on a system which does
not maintain them, they don't get changed on resize and confuse your
environment. In most cases the best remedy is to just unset them -
does that help?

------
Thomas

Sadly enough, the system I am connecting to, SUSE Linux, does use them, and the checkwinsize shopt BASH function, but, somehow, not correctly....

Just for curiosity: are you using 'expect' to log to the remote system?
If so, you'd need you modify your expect script to handle SIGWINCH properly. Let me know...
H.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]