Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ncoast.UUCP Path: utzoo!linus!decvax!cwruecmp!hal!ncoast!bsa From: bsa@ncoast.UUCP (Brandon Allbery) Newsgroups: net.unix Subject: Setting Term under System V Message-ID: <843@ncoast.UUCP> Date: Thu, 5-Sep-85 20:07:46 EDT Article-I.D.: ncoast.843 Posted: Thu Sep 5 20:07:46 1985 Date-Received: Thu, 12-Sep-85 21:28:42 EDT References: <180@ukecc.UUCP> <2735@sun.uucp> Reply-To: bsa@ncoast.UUCP (Brandon Allbery) Followup-To: net.unix Organization: North Coast Xenix, Cleveland, OH Lines: 53 Expires: Quoted from <2735@sun.uucp> ["Re: Setting TERM"], by guy@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: # # ^ttytypeterminal$ # # where ^ is beginning of line and $ is end of line. # grep "`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@Case.CSNET * \****************************************************************************/