terminal setup issues on FreeBSD
freebsd-questions-local at be-well.ilk.org
Thu Oct 22 21:22:45 UTC 2009
Edward Peschko <horos11 at gmail.com> writes:
> 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
> 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.
Lowell Gilbert, embedded/networking software engineer, Boston area
More information about the freebsd-questions