Not setting TERM explicitly wraps commands at 80 columns with nested shells in xterms using sh + bash?

Garrett Cooper yanegomi at gmail.com
Fri Oct 21 07:52:19 UTC 2011


On Fri, Oct 21, 2011 at 12:15 AM, Garrett Cooper <yanegomi at gmail.com> wrote:
> On Fri, Oct 21, 2011 at 12:08 AM, Ed Schouten <ed at 80386.nl> wrote:
>> * Garrett Cooper <yanegomi at gmail.com>, 20111021 09:00:
>>> On Thu, Oct 20, 2011 at 11:59 PM, Ed Schouten <ed at 80386.nl> wrote:
>>> > Hi Garrett,
>>> >
>>> > * Garrett Cooper <yanegomi at gmail.com>, 20111021 08:40:
>>> >>     If I fire up an xterm without setting TERM={ansi,vt100,xterm},
>>> >> [...]
>>> >
>>> > So what's the idea behind this? Why not just set TERM properly?
>>>
>>> It is set properly though -- that's the confusing part:
>>>
>>> $ echo $TERM
>>> xterm
>>
>> Oh, okay. So you mean "If I fire up an xterm without changing the
>> default TERM, [...]", right?
>>
>> Can you check whether `stty size' does return the correct numbers? That
>> way we can determine if it's a problem in xterm, your shell (or maybe
>> the kernel). Thanks!
>
> I'll run that in the next window I find that's acting funky.
> Unfortunately my system is behaving properly right now.
> Thanks for the tip :)!

Here's an example:


# Increased the window size here.
[gcooper at fallout ~]$ uname -a
FreeBSD fallout.local 10.0-CURRENT FreeBSD 10.0-CURRENT #1 r226332M:
Wed Oct 12 22:48:55 PDT 2011
root at fallout.local:/usr/obj/usr/src/sys/FALLOUT  amd64
[gcooper at fallout ~]$ stty size
60 156
[gcooper at fallout ~]$ exit
Connection to fallout.local closed.
[gcooper at bayonetta ~]$ uname -a
FreeBSD bayonetta.local 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225653M: Tue
Sep 20 08:36:49 PDT 2011
gcooper at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64
[gcooper at bayonetta ~]$ stty size
60 156
# Line was wrapping in above uname -a.

[gcooper at bayonetta ~]$ ssh starr-wireless
# Increased the window size here from the default.
starr:~ gcooper$ uname -a
Darwin starr.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
starr:~ gcooper$ echo $TERM
xterm
starr:~ gcooper$ logout
Connection to starr-wireless.local closed.
[gcooper at bayonetta ~]$ uname -a
FreeBSD bayonetta.local 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225653M: Tue
Sep 20 08:36:49 PDT 2011
gcooper at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64

    ssh'ing in to a remote terminal and resizing it is an example I
could think of that's semi-deterministic. It seems like it's an
application bug or OS caveat; I'm not sure if anything can really be
done about it because the signal might be masked in ssh when it
connects to the other side -- would have to check to be sure.
Thanks,
-Garrett


More information about the freebsd-current mailing list