On 17.11.11 10:48, alessio wrote:
In a "normal" sunray session, I can get the MAC address of the unit to
uniquely identify a DTU, using a command like this:
MAC=`cd $UTDEVROOT; pwd | sed 's/.\*\\(............\\)/\\1/'`
There is a way to get the ID of the current OVDC session using the
command line of the session itself?
You can use
dpy=`echo $DISPLAY |
sed -e 's/[^:]*:\([0-9]\)/\1/' -e 's/\([0-9]\)\..*$/\1/'`
ID=`/opt/SUNWut/bin/utwho -c | \
awk '$1 == dpy ".0" { print $5 }' dpy=$dpy`
That should work for both DTU and OVDC sessions.
The downside of this is that it issues a callback to the Sun Ray
authentication daemon, which may create a performance issue, if many
starting sessions do this at once.
A cheaper, but less supportable alternative would be based on
ID=`sed -n 's/^TERMINAL_ID=//p' /var/opt/SUNWut/dispinfo/$dpy`
Beware that the dispinfo files are not a supported interface, so this
may break in any update or even patch. But that isn't really different
from relying on the pathname underlying $UTDEVROOT.
HTH
- Jörg
--
Jörg Barfurth http://blogs.oracle.com/joergb
Disclaimer: I am employed by Oracle. The statements and opinions
expressed here are my own and do not necessarily represent those
of Oracle Corporation.
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users