Skip to content

Sun Ray @ home downside and upside

March 31, 2008

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”.

Advertisements

From → Sun

6 Comments
  1. where else could this be useful? permalink

    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.

  2. 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.

  3. 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.

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

  5. 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.

  6. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: