From owner-freebsd-questions@FreeBSD.ORG Tue Mar 8 07:40:11 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 895F216A4CF for ; Tue, 8 Mar 2005 07:40:11 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 5DECB43D2D for ; Tue, 8 Mar 2005 07:40:10 +0000 (GMT) (envelope-from emanuel.strobl@gmx.net) Received: (qmail invoked by alias); 08 Mar 2005 07:40:09 -0000 Received: from flb.schmalzbauer.de (EHLO cale.flintsbach.schmalzbauer.de) (62.245.232.135) by mail.gmx.net (mp002) with SMTP; 08 Mar 2005 08:40:09 +0100 X-Authenticated: #301138 From: Emanuel Strobl To: freebsd-questions@freebsd.org Date: Tue, 8 Mar 2005 08:39:53 +0100 User-Agent: KMail/1.7.2 References: <200503080734.46757@harrymail> <20050308072919.GD37452@dan.emsphone.com> In-Reply-To: <20050308072919.GD37452@dan.emsphone.com> X-Birthday: 10/06/72 X-CelPhone: +49 173 9967781 X-Tel: +49 89 18947781 X-Country: Germany X-Address: Munich, 80686 X-OS: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1579732.mTvOIi0h6C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200503080839.58100@harrymail> X-Y-GMX-Trusted: 0 cc: Dan Nelson Subject: Re: ttydX and xterm size (LINES and COLUMNS understanding) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 07:40:11 -0000 --nextPart1579732.mTvOIi0h6C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Dienstag, 8. M=E4rz 2005 08:29 schrieb Dan Nelson: > In the last episode (Mar 08), Emanuel Strobl said: > > When I open a xterm on the local machine, say with 100x37, vi and man > > recognizes the size and display the content correctly. If I use > > cu/tip in a 100x37 xterm "ls" works fine (uses all lines) as long as > > I start vi but man doesn't work (no scrolling possible). After the vi > > session only 24 lines (or whatever type I set in /etc/ttys) are used, > > but man works correctly. Why can I use different terminal sizes on > > the local machine and in ssh sessions but not over a serial console? > > If I set "setenv LINES 37" and "setenv COLUMNS 100" it works also on > > the serial line but why or how can vi and others know what size my > > terminal is via ssh session? I'm sure this behaviour is adoptable to > > serial consoles too. > > Telnet and ssh have out-of-band control sequences that let the client > pass things like terminal size to the server. There's no equivalent Where are they set? I can't find any environment variable which reflect thi= s. > for serial lines. You can get the screen size from vt100 terminals > (and many emulators) though, by moving the cursor to the far > lower-right corner, asking the terminal for the cursor position, and > reading the result on stdin. Even with knwon values I have the problem that when I recall the previous=20 command in tcsh which was longer than one line there's no linefeed, the=20 second line overwrites the first line. My problem is that I don't really understand how and why different=20 applications seem to use different methods of displaying text and determini= ng=20 size values. man, vi and tcsh are at least very different. Any links highly= =20 appreciated. Thanks a lot, =2DHarry --nextPart1579732.mTvOIi0h6C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCLVbNBylq0S4AzzwRAjvRAJ0TG/TcJZZGrQjejsaQxMbH9xzCOgCfXC15 6k/dmB+HXiay3QkWCPK/jOQ= =NXqt -----END PGP SIGNATURE----- --nextPart1579732.mTvOIi0h6C--