[RndTbl] Another Solaris configuration issue - xterm

Kevin McGregor kevin.a.mcgregor at gmail.com
Mon Dec 15 11:09:23 CST 2014


Another win for Adam Thompson! And another way I can fool my co-workers
into thinking I'm as smart as Adam.

On Mon, Dec 15, 2014 at 10:54 AM, Adam Thompson <athompso at athompso.net>
wrote:
>
> On 14-12-15 10:39 AM, Kevin McGregor wrote:
>
>> Good call. Now when I log in, TERM=xterm. However when I size the PuTTY
>> window to 100x55 and type a long command, it still wraps it at 80 columns
>> back to column 1 on the same line, which is not desirable. The BASH version
>> is 4.1.11(1)-release, and the environment shows COLUMNS=80 and LINES=65 --
>> different from before when COLUMNS=80 and LINES=34. Try a different
>> termtype? Any other ideas?
>>
>
> That's because SIGWINCH doesn't make its way through an iLO connection;
> regular X11 or SSH connections work fine, right?
>
> If so, then the way to deal with it is the old "eval `resize`" technique.
> (More correctly, "eval $(resize)", but both work.)
> Note that this command is supposed to work in any shell, the resize
> command auto-detects whether to emit sh(1) or csh(1) lines.  If you're
> using a non-standard shell, you may have to tell resize(1) what to emit.
>
> Alternately, "stty cols XX rows YY" should work as well.
>
> In some corner cases, you'll need to use stty(1) first, and then resize(1)
> as well (or just unset $COLUMNS and $LINES).
>
> Nowadays, it should be reasonably safe to put this in /etc/profile:
>
>     eval $(/usr/bin/resize) && stty cols $COLUMNS rows $LINES
>
> as all modern VT100-ish or ANSI-ish terminals respond to the escape
> sequences resize(1) emits, and those few that don't no longer enter weird
> modes as a result of them, and resize will time out in (IIRC) two seconds.
>
> Read the comments at the top of https://ohse.de/uwe/software/resize.c.html
> for some background on why this is such a PITA... some software only
> queries the kernel ttyios for terminal size, some query the environment
> variables, and some query the remote terminal directly.
>
>
> --
> -Adam Thompson
>  athompso at athompso.net
>  Cell: +1 204 291-7950
>  Fax: +1 204 489-6515
>
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.muug.mb.ca/pipermail/roundtable/attachments/20141215/bdf743e8/attachment.html>


More information about the Roundtable mailing list