Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site redwood.UUCP Path: utzoo!utcs!lsuc!pesnta!amdcad!fortune!redwood!rpw3 From: rpw3@redwood.UUCP (Rob Warnock) Newsgroups: net.unix-wizards Subject: Re: setting TERM - actually about terminal initialization Message-ID: <172@redwood.UUCP> Date: Mon, 25-Feb-85 06:50:01 EST Article-I.D.: redwood.172 Posted: Mon Feb 25 06:50:01 1985 Date-Received: Wed, 27-Feb-85 09:42:12 EST References: <1145@aecom.UUCP> <472@rlgvax.UUCP> <554@astrovax.UUCP> Organization: [Consultant], Foster City, CA Lines: 35 +--------------- | I'd like to submit a counterproposal. These ideas are not original. | 1) Define a tty ioctl that saves the current tty modes in an extra place... | 2) Define a tty ioctl that resets the current tty modes ... | 3) Make /etc/rc set from a script permanent tty modes ... | 4) A tty would reset itself on close to the permanent tty modes. | Bill Sebok Princeton University, Astrophysics | {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls +--------------- The Fortune Systems FOR:PRO version of Unix does almost exactly that, with the difference that "savemodes" saves "the current characteristics as the defaults for the tty on subsequent first opens". Thus, item #2 is not provided (but doesn't seem to be needed), and #4 is accomplished in a slightly different way (first open rather than last close). The Fortune feature works just fine, and seems to do exactly what you want. Since "stty" sets the modes as it encounters them, one only needs to mention the "savemodes" last. I put the following two lines are in the ".rc" file on my system, as needed for my configuration: stty 1200 savemodes >/dev/tty01 # Diablo printer - make it sticky stty 1200 hupcls savemodes >/dev/cul0 # kludge for hangup problem Is this what you were suggesting? (Note: I may be biased in this matter, as I was working there when this feature was implemented. Nevertheless, I have found it useful myself.) Rob Warnock Systems Architecture Consultant UUCP: {ihnp4,ucbvax!dual}!fortune!redwood!rpw3 DDD: (415)572-2607 USPS: 510 Trinidad Lane, Foster City, CA 94404