home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / software / 3654 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!gaia.ucs.orst.edu!news
  2. From: tpugh@oce.orst.edu (Tim Pugh)
  3. Newsgroups: comp.sys.next.software
  4. Subject: Re: How can a program check to see if user is on console?
  5. Message-ID: <1k467lINN8la@gaia.ucs.orst.edu>
  6. Date: 26 Jan 93 20:16:53 GMT
  7. Article-I.D.: gaia.1k467lINN8la
  8. References: <7466@ucsbcsl.ucsb.edu>
  9. Reply-To: Tim Pugh <tpugh@oce.orst.edu>
  10. Organization: University Computing Services - Oregon State University
  11. Lines: 22
  12. NNTP-Posting-Host: tsunami.oce.orst.edu
  13.  
  14. In article <7466@ucsbcsl.ucsb.edu> doug@foxtrot.ccmrc.ucsb.edu (Douglas Scott)  
  15. writes:
  16. > I am writing some C code which needs to check to see if the user is logged
  17. > onto the console (i.e., any tty, as long as the user is sitting at the
  18. > console).
  19.  
  20. Another way I found is to check the shell environment for the variable  
  21. "Workspace".  If the variable "Workspace" exists, then the user is at the  
  22. console.  It's worked for me but I always use the csh.  If anyone knows of a  
  23. problem, I would like to know, too.
  24.  
  25. I have a C routine I'd post but it's at home.  So if interested in seeing the  
  26. routine, send me mail.
  27.  
  28.     - Tim -
  29. --
  30. Tim Pugh
  31. College of Oceanic and Atmospheric Sciences
  32. Oregon State University
  33. tpugh@oce.orst.edu
  34. NeXTmail ok!
  35.