screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting screen size into the env?


From: Micah Cowan
Subject: Re: Getting screen size into the env?
Date: Wed, 06 Aug 2008 23:14:56 -0700
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Davies wrote:
> How do I get the screen size env vars set properly? Screen appears to
> be populating TERMCAP for me (correctly), as it's not defined when
> outside of screen, but does exist inside.

There's nothing that ever sets env vars to the screen size.

However, if you use bash, it will set _shell_ variables, COLUMNS and
LINES, automatically. This isn't something that screen does, but bash.
Bash does _not_ export these by default, however; you'll need to do

 $ export COLUMNS LINES

to get them into the environment. Of course, if you're not running bash,
you may not have them at all; in which case you may need to parse them
out of the screen-supplied TERMCAP (which, unlike the bash vars, can't
be kept up-to-date when the window size changes).

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImpLg7M8hyUobTrERAh+bAKCJHJSCjLXOcKiw4DWw+RTFad0LPQCdHam3
r8nPNuvL9ydxdEJ/nDhl2eI=
=7t0T
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]