Sun Ray @ home downside and upside

The downside is that one day you will ride to work only to find you have an empty pass holder in you pocket.

The upside is that you can check and see that you have left your pass in your Sun Ray @ home:

: enoexec.eu FSS 1 $;  utwho -c | grep 'JavaBadge.\*cg13442'

 71.0 JavaBadgeNP.4090009c2311b2071914 cg13442  129.150.116.130 P8.00144f7dc334

: enoexec.eu FSS 2 $; 

So I know it is not lost. Now the problem is that it contains all the cash for lunch in a “cashless office”.

Comments:

could this work if you have left your badge at home, but can't start any sessions at work since everything is locked to your current session? I've seen co-workers go nuts trying to find the last place they logged into so they can find the sun ray server they were connected to so they can kill their old session and start a new one.

Posted by where else could this be useful? on March 31, 2008 at 04:02 AM BST #

Now that is an interesting question. If you don't know which Sun Ray server you are currently logged in on how do you kill the session?

The easiest way is to go into ~/.dt/sessionlogs and look for the last file to be update:

: enoexec.eu FSS 46 $; ls -lrt | tail -3
-rw-r--r-- 1 cg13442 staff 179740297 Mar 28 18:05 eagain_DISPLAY=:16
-rw-r--r-- 1 cg13442 staff 3435217 Mar 31 09:19 enoexec_DISPLAY=:71
-rw-r--r-- 1 cg13442 staff 4142249 Mar 31 11:32 enoexec_DISPLAY=:14
: enoexec.eu FSS 47 $;

That would give you the name of the host on which the last 3 sessions were run.

Posted by Chris Gerhard on March 31, 2008 at 04:35 AM BST #

and here is the shell function to do this:

function whereismysession
{
( unalias cd
cd ~/.dt/sessionlogs
for h in $(for i in \*
do
echo ${i%%_DISPLAY\*}
done | sort | uniq)
do
ssh $h $(whence utwho) -c | grep 'JavaBadge.\*'"$LOGNAME" > /dev/null && echo $h
done)
}

If you don't use java badges then substitute the correct string in the script.

Posted by Chris Gerhard on March 31, 2008 at 04:43 AM BST #

So I assume you had to start a new session and couldn't pick up the old one ? I had the same issue recently.

Posted by Darren Moffat on April 01, 2008 at 04:42 AM BST #

Indeed. I even had to borrow a badge to come and see you! However I did manage to run 2 gnome sessions simultaneously with no apparent ill effects. Firefox and Thunderbird both insisted I kill the other but everything else gave the illusion of working.

Posted by Chris Gerhard on April 01, 2008 at 04:46 AM BST #

It is actually possible to associate an existing SunRay Session with multiple cards. Once you know the tokenID of the new card its quite straight forward either via the command line or through the admin gui (assuming you have the help of your friendly SunRay admins!).

Via the command line it can be achieved with the 'utuser' command in the following format:

/opt/SUNWut/sbin/utuser -ai [new token id] [current token id]

Or based on the example above:

/opt/SUNWut/sbin/utuser -ai MicroPayflex.5000f8b000130100 JavaBadgeNP.4090009c2311b2071914

You can then later disassociate the new card at end of the day with:

/opt/SUNWut/sbin/utuser -di [token id to remove]

Though, I'm not sure if this will work if the badge you've left at home is actually in a SunRay and not just on the kitchen table.

Posted by Iain Bullard on April 09, 2008 at 09:30 AM BST #

Post a Comment:
Comments are closed for this entry.
About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today