home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / coherent / 6756 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.0 KB  |  52 lines

  1. Newsgroups: comp.os.coherent
  2. Path: sparky!uunet!cs.utexas.edu!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!csus.edu!netcom.com!netcomsv!rgm!ray
  3. From: ray@rgm.com (Ray Mendonsa)
  4. Subject: Re: Terminal question
  5. Message-ID: <9301121019.36@rgm.com>
  6. Organization: RGM *nix - Sacramento, CA
  7. Date: Tue, 12 Jan 1993 18:19:35 GMT
  8. References: <C0pCCE.2oF@ATK.COM>
  9. Lines: 41
  10.  
  11. mtarrant@ATK.COM (Mike Tarrant) writes:
  12.  
  13. . . .
  14.  
  15. >  My question is, at a system level, how does Coherent "know" that the
  16. >terminal at the end of /dev/com4pl is a vt100, or a wyse50, or tvi925?
  17. >I know there is the TERM environmental variable in my .profile file,
  18. >but if I make that the terminal type, it'll be wrong when I log-on at
  19. >the console (ansipc).
  20. >  As far I have been able to determine, terminal type is tied to the
  21. >user, and I think it should be known only by the system.  What am I
  22. >missing?
  23.  
  24. I was in a similar situation on my system.  I typically used the console
  25. for logins, but occasionally dial in from away from home.  I also have
  26. some friends who usually log in remote, but occasionally use the console.
  27.  
  28. I assume all users logged in over com ports are using VT100, and console
  29. logins are always ansipc.  MWC tech support gave me this bright idea
  30. to incude in /etc/profile :
  31.  
  32. ---- begin /etc/profile fragment ----
  33. case `tty` in
  34.     /dev/mono?)    echo "Using ANSI PC term emulation."
  35.             export TERM=ansipc;;
  36.     /dev/com1fr)    echo "Using VT100 term emulation."
  37.             export TERM=vt100;;
  38.     *)        echo "How did you get in here?"
  39.             export TERM=vt100;;
  40. esac
  41. ---- end /etc/profile fragment ----
  42.  
  43. This structure allows you to select default emulation depending upon
  44. the output of `tty` (the login port).  I think this is what you need.
  45.  
  46. Thanks to MWC tech support!
  47. -- 
  48. /-Ray Mendonsa--ray@rgm.com--Administrator, rgm.com--Sacramento, CA---->
  49. | 916/923-5013 8n1,HST ; login: new ; Public access Usenet
  50. | There is only one truth, the absolute truth. | PGP v2.1 public key
  51. | Real men do it in four lines or less.        | available upon request.
  52.