<div dir="ltr">Another win for Adam Thompson! And another way I can fool my co-workers into thinking I&#39;m as smart as Adam.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 10:54 AM, Adam Thompson <span dir="ltr">&lt;<a href="mailto:athompso@athompso.net" target="_blank">athompso@athompso.net</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 14-12-15 10:39 AM, Kevin McGregor wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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?<br>
</blockquote>
<br></span>
That&#39;s because SIGWINCH doesn&#39;t make its way through an iLO connection; regular X11 or SSH connections work fine, right?<br>
<br>
If so, then the way to deal with it is the old &quot;eval `resize`&quot; technique.  (More correctly, &quot;eval $(resize)&quot;, but both work.)<br>
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&#39;re using a non-standard shell, you may have to tell resize(1) what to emit.<br>
<br>
Alternately, &quot;stty cols XX rows YY&quot; should work as well.<br>
<br>
In some corner cases, you&#39;ll need to use stty(1) first, and then resize(1) as well (or just unset $COLUMNS and $LINES).<br>
<br>
Nowadays, it should be reasonably safe to put this in /etc/profile:<br>
<br>
    eval $(/usr/bin/resize) &amp;&amp; stty cols $COLUMNS rows $LINES<br>
<br>
as all modern VT100-ish or ANSI-ish terminals respond to the escape sequences resize(1) emits, and those few that don&#39;t no longer enter weird modes as a result of them, and resize will time out in (IIRC) two seconds.<br>
<br>
Read the comments at the top of <a href="https://ohse.de/uwe/software/resize.c.html" target="_blank">https://ohse.de/uwe/software/<u></u>resize.c.html</a> 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.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
-Adam Thompson<br>
 <a href="mailto:athompso@athompso.net" target="_blank">athompso@athompso.net</a><br>
 Cell: <a href="tel:%2B1%20204%20291-7950" value="+12042917950" target="_blank">+1 204 291-7950</a><br>
 Fax: <a href="tel:%2B1%20204%20489-6515" value="+12044896515" target="_blank">+1 204 489-6515</a><br>
<br>
______________________________<u></u>_________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca" target="_blank">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/<u></u>listinfo/roundtable</a><br>
</div></div></blockquote></div></div>