I'd try 'utsession -p -x', you'll find all the information there in an 
easy-to-parse format.  The only drawback is that it requires root privileges to 
run.

Best Regards,
Nick Ross

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Bob Doolittle
Sent: Wednesday, March 11, 2009 10:47 AM
To: SunRay-Users mailing list
Subject: Re: [SunRay-Users] Finding out which DTU or token I'm using

utuser -p is much better than utdesktop -lc or utwho -c, both of which 
involve callbacks to utauthd.
utuser -p is cheaper since it's a simple SRDS lookup.

-Bob

Ceri Davies wrote:
> We're running SRSS4.1 with kiosk sessions and cards, the type of kiosk
> session being selected from the card token.
>
> When a kiosk session runs, SUN_SUNRAY_TOKEN is set to something like
> user.1231424265-2914.  I'd like to tie that back to the DTU that the
> session is on, plus the card that is inserted.
>
> Currently, the best I can do is to get the card token into $CARD_TOKEN
> from:
>
>   utuser -p $SUN_SUNRAY_TOKEN | tail -2 | awk '/./ {print $1}'
>
> or:
>
>   utwho -c | awk "/$SUN_SUNRAY_TOKEN/ {print \$5}" | sed s/P*./pseudo/
>
> which I'm going to assume isn't all that safe, then go back through:
>
>   utdesktop -lc | awk "/$CARD_TOKEN/ {print \$1}"
>
> for the desktop id.
>
> None of the other ways that I've seen (abuse of UTDEVROOT, "utuser -p
> $SUN_SUNRAY_TOKEN", etc.) seem to work.
>
> Did I miss something, or is this just the only way now?
>
> Cheers,
>
> Ceri
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> SunRay-Users mailing list
> [email protected]
> http://www.filibeto.org/mailman/listinfo/sunray-users
>   

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to