comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Infering who the user is?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Infering who the user is? [message #16443] Tue, 27 July 1999 00:00 Go to next message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
Greetings idl ones,

I'm a WinNT weenie, but would like to
find out how to identify a user when
the user starts an IDL procedure, on both
NT and UNIX OS.


Is this possible under unix?
Can I do something like cd ~ and
grab the folder name, or spawn and
call whoami? Actually, nevermind,
I'll spawn and call whoami.

Is there a more general solution?

Is user ID possible under WinNT?
As a general solution, is there an
IDL system variable that holds this info?

(searching for "user" or "who" or "system"
is about as useful as searching for
the letter "e")



thanks,
bob

"Thou shalt not worship false IDLs"


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Re: Infering who the user is? [message #16522 is a reply to message #16443] Wed, 28 July 1999 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
rgs <dejastockwell@my-deja.com> wrote in message
news:7nkrp3$foc$1@nnrp1.deja.com...
> Greetings IDL ones,
>
> I'm a WinNT weenie, but would like to
> find out how to identify a user when
> the user starts an IDL procedure, on both
> NT and UNIX OS.

Under NT get the value (IDL procedure GETENV) of the environment variable
USERNAME.

Under Win95/98 (which you didn't ask about) USERNAME is not set
automatically on login, but it could be set in autoexec.bat.

Environment variables are case-insensitive in Windows.

With Unix the corresponding variable appears to depend on the shell, e.g.
LOGNAME in the C shell and USER in the bash shell, so I guess trapping the
output of whoami is the most general solution.

---
Mark Hadfield m.hadfield@niwa.cri.nz
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: combine 2 row-vectors to a matrix
Next Topic: pop up widget

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:30:15 PDT 2025

Total time taken to generate the page: 1.75920 seconds