Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2009 17:22:42 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Edward Peschko <horos11@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: terminal setup issues on FreeBSD
Message-ID:  <44d44f86ot.fsf@be-well.ilk.org>
In-Reply-To: <5cfa99000910221229g4fde381fpaa77718d20520e24@mail.gmail.com> (Edward Peschko's message of "Thu, 22 Oct 2009 12:29:24 -0700")
References:  <5cfa99000910221229g4fde381fpaa77718d20520e24@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Edward Peschko <horos11@gmail.com> writes:

> All,
>
> I cannot believe that this is not a faq - yet a search of google
> didn't turn up any hits.
>
> How exactly do you set terminal settings for bsd? I've done a
>
> setenv TERM xterm

Why?

> where I'm ssh'ing into a local box in an rxvt
> (in a screen session), but there is no resize, and
> the variables COLUMNS and LINES don't
> work as they do on linux.

Well, you lied to the shell about your terminal type (thanks to your
shell session, the terminal emulator is screen, not rxvt), so the shell
has a right to be confused.

resize(1) is installed by the xterm, so if you don't have that on the
server, you won't have resize.  Unless your shell implements it
internally, but I don't think csh(1) does that.

> In addition, the terminal that I've got doesn't
> handle newlines correctly; I get a 'looping' effect;
> where the prompt loops back onto itself onto the same line.

Sounds like another symptom of using the wrong terminal description.

Try setting the terminal type to "screen" or "vt100" (which is what
screen claims to emulate, although it understands even more extensions
than xterm).  Better yet, don't set it *at all* and let ssh carry the
environment value through from the other side.

> Anyways, sorry if I missed any obvious FAQs, but this is
> exceedingly annoying, as a result of the above,
> it makes maintenance and work on the said machine
> impossible.  The OS in question I'm using is unfortunately
> of necessity very old, ie: freebsd-4.4, so whatever solution
> to this will have to take that into account.

Well, I can't actually test any of my suggestions, because this all
works well on recent software, even when I deliberately try to confuse
the terminal emulation the way you did.  Unfortunately, my memory isn't
good enough to remember all of the relevant implementation details that
have changed in the intervening eight years.

Good luck.
-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
		http://be-well.ilk.org/~lowell/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44d44f86ot.fsf>