From owner-freebsd-questions@FreeBSD.ORG Thu Oct 22 21:22:45 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6643D106566C for ; Thu, 22 Oct 2009 21:22:45 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9DA8FC16 for ; Thu, 22 Oct 2009 21:22:45 +0000 (UTC) Received: (qmail 18652 invoked from network); 22 Oct 2009 21:22:44 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 22 Oct 2009 21:22:44 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 2351C508A8; Thu, 22 Oct 2009 17:22:43 -0400 (EDT) From: Lowell Gilbert To: Edward Peschko References: <5cfa99000910221229g4fde381fpaa77718d20520e24@mail.gmail.com> Date: Thu, 22 Oct 2009 17:22:42 -0400 In-Reply-To: <5cfa99000910221229g4fde381fpaa77718d20520e24@mail.gmail.com> (Edward Peschko's message of "Thu, 22 Oct 2009 12:29:24 -0700") Message-ID: <44d44f86ot.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: terminal setup issues on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 21:22:45 -0000 Edward Peschko 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/