Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2005 08:39:53 +0100
From:      Emanuel Strobl <emanuel.strobl@gmx.net>
To:        freebsd-questions@freebsd.org
Cc:        Dan Nelson <dnelson@allantgroup.com>
Subject:   Re: ttydX and xterm size (LINES and COLUMNS understanding)
Message-ID:  <200503080839.58100@harrymail>
In-Reply-To: <20050308072919.GD37452@dan.emsphone.com>
References:  <200503080734.46757@harrymail> <20050308072919.GD37452@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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--



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