Setting Term under System V
Brandon Allbery
bsa at ncoast.UUCP
Fri Sep 6 10:07:46 AEST 1985
Expires:
Quoted from <2735 at sun.uucp> ["Re: Setting TERM"], by guy at sun.uucp (Guy Harris)...
+---------------
| > Does SysV have anything along the lines of Berkeley's
| > /etc/ttytype database for specifing terminal types?
|
| Well, if you fix a bit of brain damage in "login", the tools are already
| there. "login" reams out the environment when it's entered, and builds a
| new one. It should propagate the value of TERM from the environment on
. . .
| Another alternative which may be better (both for S5 and 4.3BSD, which also
| permits you to run things other than "/etc/getty" as a login program) would
| be to have a program which opens a terminal for input and output as file
| descriptors 0, 1, and 2, creates a new process group for itself and connects
. . .
I have a better idea. We're talking System V, right? So, if you have the
Berkeley tool ``tset'' put the following in /etc/profile (and /etc/cshprofile
if you have csh with the correct patches; Plexus sys[35] does):
SH CSH
TERM="`tset -`"; export TERM setenv TERM "`tset -`"
If not, a cheap ``tset -'' can be built easily and placed in /etc/profile. It
would be something like:
: #
# Print the terminal type from /etc/ttytype. This file has terminals
# and TERM values as follows:
#
# ^ttytype<tab>terminal$
#
# where ^ is beginning of line and $ is end of line.
#
grep "<tab>`tty`\$" /etc/ttytype | cut -f2
Note that the format of this /etc/ttytype is rather fixed.
If you don't have an /etc/profile -- Are you sure you're running System V? Or
did AT&T realize it had done something right in System III and remove it from
System V?
--bsa
--
/****************************************************************************\
* Brandon S Allbery, 6504 Chestnut, Independence, OH 44131 +01 216 524 1416 *
* (phone and address subject to change in ca. 1-2 months when I get an apt.) *
* 74106,1032 CIS BALLBERY MCIMAIL TELEX 6501617070 ncoast!bsa at Case.CSNET *
\****************************************************************************/
More information about the Comp.unix
mailing list