which is my login terminal

Nigel Holder Marconi nwh at gec-rl-hrc.co.uk
Wed Jun 25 03:27:08 AEST 1986


   I have an application that needs to know whether I am logged
on at the console to decide whether I can paint all over the
sun bit-mapped screen.  I could be in suntools, a pty (either via
suntools, remote login or any windowing system), the normal console,
device, or an external port (eg. ttya).  What I really need to know
is whether I actually logged in at the console for this session.
As other people might want to run the application the solution must
be general.  If I'm not on a pty then it is possible to use ttyname().
Otherwise, how is it possible ? (I've thought about finding
out somehow whether my pty and its associated winxx device
are installed in the suntools environment, but haven't pursued it yet).


Nigel Holder			UK JANET:       yf21 at uk.co.gec-mrc.u
Marconi Research,		ARPA:           yf21%u.gec-mrc.co.uk at ucl-cs
Chelmsford,
Essex. CM2 8HN.

+44 245 73331   ext. 3219 / 3214



More information about the Comp.unix mailing list