Marc Brünink wrote:
Hi,
thanks to both of you. Actually I was searching for a method in C but
however...
I'll wrap my program in a shell script.
Just for completeness: I use
/opt/SUNWut/bin/utwho -c | grep $SUN_SUNRAY_TOKEN | sed -e
's/.*\.\([0-9a-f]*\)/\1/'
This won't work if you logged in as root. To work with root in the above
use utwho -ca.
Also it displays all the DTUs MAC ids if you are logged in to a MH group.
So I think the best bet is to use of the Brad's first suggestion i.e
utdesktop ,
which seems to work in all conditions.
Thanks
P.S.M.Swamiji
Note:These are my personal opinions , nothing to do with my employer
I think "grep $USER" is a bad idea. You could have more than one
session running :-)
Thanks
Marc
Brad Lackey - US-SW Desktop Product Lead wrote:
If the device is behind NAT, $UTDEVROOT will not be available so you
would not be able to get to that path.
Alternatives to the method sent by P.S.M. which don't use UTDEVROOT are:
utdesktop -Lc | grep ${SUN_SUNRAY_TOKEN} | cut -f 1 -d " "
utwho -c | grep $USER | nawk '{split($5,TMP,"."); print TMP[2]}'
Brad
P.S.M. Swamiji wrote:
Marc Brünink wrote:
Hi all,
I need some help with the following scenario:
We've two SunRays. One with a microphone attached and one without.
Our program should behave different depending which SunRay the user
is using. To be specific: The Sunray with the microphone attached
should be able to use some resource to place a call. The other
Sunray shouldn't be able to do that. However a user should be able
to log into both Sunrays with the same username and password. So I
need a possibility to distinct between these 2 Sunrays. I thought
about using utwho and extract the MAC.However it would be nicer if
I can get the MAC without a system(..) call? Any possiblility to
get the MAC address with C? Any other idea?
If you just use only pseudo tokens then you can get the MAC id by
just removing
the "pseudo." from the SUN_SUNRAY_TOKEN variable .
Also ls -l $UTDEVROOT displays the MAC id but needs to do some
scripting
(awk and cut ) to get the exact MAC id and this should work for any
type of
tokens.
Thanks
P.S.M.Swamiji
Note:These are my personal opinions , nothing to do with my employer
Thanks
Marc
_______________________________________________
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
--
*Brad Lackey*
Desktop Product Lead
US Software Practice
(720) 548-3339
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
------------------------------------------------------------------------
_______________________________________________
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