🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.software
Article #1751

Re: How can a program check to see if user is on console?

#1751
From: Tim Pugh
Date: Tue, 26 Jan 1993 20:16
22 lines
1307 bytes
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!
Technical Details
Message-ID: <1k467lINN8la@gaia.ucs.orst.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!gaia.ucs.orst.edu!news
References: <7466@ucsbcsl.ucsb.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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