Friday Jan 23, 2009

Update to Sun Ray access hours script

I have just uploaded and update to my script that controls the access hours of users to Sun Ray DTUs. The change is to not block the DTU if the user accepts the warning and disconnects voluntarily.

With that test in place the number of forced disconnects has fallen to zero which is good as the warning about bug 6791062 still applies so this reduces the chances of hitting the bug (if it is indeed triggered by the change of the ipfilter rules).

Monday Mar 31, 2008

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:

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

 71.0 JavaBadgeNP.4090009c2311b2071914 cg13442 P8.00144f7dc334

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

Tuesday Mar 25, 2008

Automatic opening a USB disk on Sun Ray

One of my users today had a bit of a hissy fit today when she plugged in her USB thumb drive into the Sun Ray and it did nothing. That is it did nothing visible. Behind the scenes the drive had been mounted somewhere but there was no realistic way she could know this.

So I need a way to get the file browser to open when the drive is inserted. A quick google finds " "USB Drive" daemon for Sun Ray sessions" which looks like the answer. The problem I have with this is that it polls to see if there is something mounted. Given my users never log out this would mean this running on average every second. Also the 5 second delay just does not take into account the attention span of a teenager.

There has to be a better way.

My solution is to use dtrace to see when the file system has been mounted and then run nautilus with that directory.

The great thing about Solaris 10 and later is that I can give the script just the privilege that allows it to run dtrace without handing out access to the world. Then of course you can then give that privilege away.

So I came up with this script. Save it. Mine is in /usr/local which in turn is a symbolic link to /tank/fs/local. Then add an entry to /etc/security/exec_attr, subsisting the correct absolute (ie one with no symbolic links in it) path in the line.

Basic Solaris User:solaris:cmd:::/tank/fs/local/bin/utmountd:privs=dtrace_kernel

This gives the script just enough privileges to allow it to work. It then drops the extra privilege so that when it runs nautilus it has no extra privileges.

Then you just have to arrange for users to run the script when they login using:

pfexec /usr/local/bin/utmountd

I have done this by creating a file called /etc/dt/config/Xsession.d/utmountd that contains these lines:

pfexec /usr/local/bin/utmountd &
trap "kill $!" EXIT

I leave making this work for uses of CDE as an exercise for the reader.

Thursday Dec 27, 2007

Ethernet over mains working

Following on from my earlier ethernet over mains post I have now purchased enough ethernet over mains bricks to from two separate networks one for each fuse box and each network now claims 85Mbits/sec. So currently I have:

Sun Ray <~~~ Ethernet over Mains ~~~\\
                                     > HUB <~~~ Ethernet over Mains ~~~\\
Sun Ray <--- Cat 5 Cable -----------/                                    > Switch --- Server
Sun Ray <--- Cat 5 Cable -----------------------------------------------/1

Which is less than ideal as the picture frame Sun Ray is connected via two Ethernet over mains hops and one of those is shared with another Sun Ray however until the rest of the house moves are done it works. At that point the switch will live where the Hub currnetly is so no Sun Ray will be more than one “mains hop” away from the server. The picture in the frame refreshes in about 2 seconds which is o.k and it is not loosing the connection to the Sun Ray server, which means it has returned to being a practical solution.

The ethernet over mains bricks coped much worse when there was one on one fuse box and two on the other compared to when there were just two bricks one on each fuse box.

1If ascii art is good enough ascii art will do. The answer is invariably wanted as fast as possible, pretty does not make it more right.

Wednesday Dec 19, 2007

Ethernet over Mains

Since the whole house is not wired with Cat 5 cable I have had to use Mains over ethernet to provide some networking. However after our building works the mains in our house is now split in two with two fuse boxes (containing circuit breakers and RCDs) which then have separate tails leading to the electricity board fuse.

1Needless to say the computer that drives the Sun Rays is on one mains fuse box and the Sun Ray in the kitchen is on the other.

You can see the effect of the extra hop in the screen shot. Rather than the maximum 85Mbps when the two mains bricks are on the same fuse box that reduces to a paltry 13 Mbps thanks to the hop to the Electricity board fuse and back. This explains why that Sun Ray photo frame sometimes looses connection with the server when updating the picture. The other Sun Ray in Sues Office works like a dream2.

Clearly using these to form a network between buildings would not fly. That does however not stop me from being paranoid enough to have blotted out the ethernet addresses and passwords from the screen shot.

I can see that if in the final network set up I have to have devices on both fuse boxes I will have to run them as separate networks which will cost me one extra mains over ethernet brick.

1Yes this is a windows only application. However I did grab this screen shot using a VNC session on Solaris.

2Except when the server will occasionly on booting negotiate the ethernet switch down to 100Mbs rarther than 1Gb at which point things are much more sluggish, so I have a cron job that checks the speed and warns me of this.

Tuesday Nov 06, 2007

17" Wide screen Sun Ray Photo Frame

I've briefly mentioned before that we have had the builders in recently and at last we are reaching the final few steps. This includes an LCD TV for the kitchen mounted on the wall. I'm sure you all know, modern LCD TV's all have an input for a computer. So I must be the last of millions to turn my LCD TV into a 17” photo frame powered by a Sun Ray 1 and some ethernet over mains plugs.

With SRSS 4.0 I can, although so far have not, have kiosk mode running just on this one Sun Ray although since everyone in the house has a smart card there is not really any need.

The “photo frame” software is no more than a proof of concept. A script that finds all my photos (about 3000) and uses display(1) to display them. Still need to confirm I have turned off he screen saver, no point in waiting for keyboard or mouse input as the Sun Ray has none and is quite well hidden. Also ideally it needs to have better transitions for the pictures and a way of controlling it. I can see a USB infra red receiver and remote control so that I can select that bike porn channel on demand.

The upgrade of the SRSS software would have been so much simpler if I had:

  1. Read the manual first.

  2. Rebooted when the documentation told me to. I hate rebooting, it is just so Windows but it really did seem to be required.

  3. Read the manual first.

There are however one issue. Kiosk mode does not seem to work with JDS on build 76, which I think is a know bug.

Given that a Sun Ray 1 on ebay is £25, this has to be a really cheap photo frame and this is a 17” wide screen photo frame. In fact the ethernet plug was more than the Sun Ray.


This is the old blog of Chris Gerhard. It has mostly moved to


« July 2016