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