Wednesday Sep 23, 2009

purple-url-handler and XMPP URLs

I've finally worked out how to drive purple-url-handler. Strictly John worked it out, so I will stand on his shoulders, but for some reason it would not work for me and I now know why and have a workaround.

First you need an XMPP URI on a web page. Some thing like:

will when clicked in a browser that has the right helper, something OpenSolaris has had for some time, will take your IM client to that room. However with pidgin that is only the case if that room is available in the first XMPP server listed in your list of accounts. So given that this room is on Sun's IM server with the list of accounts looking like this:

It will try and connect to the first XMPP server listed, which is google and hence fail. Changing the order to be:

and then logging in and out and now the link will work. You can drag and drip the entries in pidgin.

Saturday Jun 21, 2008

Return of automatic status setting in IM

At last the rest of the bits of “gaim” that disappeared from Solaris when it moved to be “pidgin” have returned in Nevada build 92. I'm talking about “purple-remote” which is the program that replaces “gaim-remote” and thus allows me once again to set my away message using “utaction” so when I disconnect from my Sun Ray session my IM status is automatically set as well.

If you take the script that I wrote last time and do a global edit changing “gaim-remote” to be “purple-remote” it will work. Something I realise now but did not then was that you only need one ut-action command to handle both connection and disconnection so this will do it:

utaction -d "purple-remote 'setstatus?status=away&message=Away from Sun Ray'" -c "${HOME}/bin/sh/ut-where"

Monday Jul 23, 2007

Good Morning build 68

Build 68 has hit our Sun Ray server last week. Which was good news and bad news. The good news is that this gets us the new “pidgin” IM client. The bad news is that the build of pidgin does not contain the XMPP (aka jabber) plugins which renders it as much use as a chocolate Tea pot. The bug id is: 6577264. Not fixed in build 69.

Luckily it took seconds for some bright spark to have a version built from source. The config options are “CC=cc -disable-perl --disable-tcl –prefix=/blah”. Disabling perl is obviously goodness, but TCL is a pity but with it it just dumps core. Alas this version is not aware of the gnome-keyring.

Apart from that the build is good.

: FSS 1 $; uname -a

SunOS estale 5.11 snv_68 sun4u sparc SUNW,Sun-Fire

: FSS 2 $; 

Update: For those who are close to GMP I have built both SPARC and x86 copies of pidgin for Nevada. They can be found here ~cg13442/pidgin/$(uname -p)/bin

If you use the c-shell you have my deepest sympathies but they don't run to me giving a c-shell friendly path.

As with the one mentioned above they don't understand how to talk to the gnome keyring

Tuesday Mar 20, 2007

Don't IM.... talk!

I had to contact an engineer quite urgently today. First email, then IM, not logged in so I set a buddy pounce, then phone, got voice mail.

Finally got him.

Using good old talk(1)!

Welcome to UNIX.


Tuesday Oct 17, 2006

More gaim, utwho and utaction mobile Sun Ray users

My previous use of gaim-remote and utaction to update my IM status automatically was good but I kept not getting invited to lunch when I came into the office as I forgot to reset the message to be “In the Office” or slightly less irritatingly would get invited to lunch when I was a home.

Since for the common case I only really work in two locations, the office or at home and the Sun Ray at home does not change often if I can figure out which Sun Ray I am currently connected to I could set the message automatically.

First you need to run this command to get the identity of the Sun Ray that is at home (or in any other location that is “special”):

utwho -c | nawk -v d=${DISPLAY#:} '$1 == d { print $5 }'
Now write that into a file in your home directory followed by a colon and then the description you wish to have appear when you are connected via that Sun Ray:
utwho -c | nawk -v d=${DISPLAY#:} '$1 == d {OFS=":"; print $5, "Working @ Home" }' >> ~/.ut_locations

You can populate that file with any number of specific locations.

Now put this script somewhere on your path called ut-where

#!/bin/ksh -xp

function get_location
        nawk -F: '$1 == "'$1'" { print $2 }' ~/.ut_locations

THIS_APPLIANCE=$(utwho -c | nawk -v d=${DISPLAY#:} '$1 == d { print $5 }')

THIS_LOC=$(get_location ${THIS_APPLIANCE})

gaim-remote 'setstatus?status=available&message='"${THIS_LOC:-At Office}"

As you can see it will set the default message to be “At Office” if it can't find the named Sun Ray otherwise it used the second colon separated field as the message to use for gaim.

Then update the ut-gaim script to be:

#!/bin/ksh -p
utaction -d "gaim-remote 'setstatus?status=away&message=Away from Sun Ray'" > /dev/null 2>&1 &
utaction -c "/home/cg13442/bin/sh/ut-where" > /dev/null 2>&1 &

All the above assumes that you have /opt/SUNWut/bin in your path.

Now when each Sun Ray appliance has a build in GPS that you can query to find it's location this won't be so hard to do in the more general case.\*


\*I have no idea if there are any plans to put a GPS in each Sun Ray in fact if there are I will be astounded.

Saturday Sep 16, 2006

Good bye talker, jabber and thank you

This week my part of the business actually made concrete progress to simplified our business.

For a few years, like over 10, we have been using instant messaging to communicate between all the teams. We have a Jabber network, a home grown chat system called Talker plus IRC and more recently IT provided an instance of the Sun Instant messaging server for all of Sun.

Last Monday we began to move over to the IT service with the jabber network being decommissioned this Monday and the Talker rooms next Monday. No more will it be like having four phone systems none of which would really talk to the other. It is true that the SunIM service and the jabber service could have been federated but that would not have given use the ease of use and ease of finding contacts we needed to support our customers.

I would however like to thank all those who implemented and have been looking after those networks, mostly in their “spare” time. Talker and jabber were invaluable.

So Peter and Paul my thanks to you and everyone who helped you out.


Thursday Apr 21, 2005

Two Ronnies training video

One of the funniest Two Ronnies sketches ever was a take off of mastermind, where Ronnie Corbett was in the black chair and his specialist subject was “answering the question before last”. What I have only recently dsicovered is that this was all a training video. The Ronnies were training all of us for Instant Messaging. I'm always doing it and seeing it. While I type the answer to one question the person at the other end asks another question so the whole conversation gets out of sync.

So from now on if I this happening I'm going to simply type “Two Ronnies” at which point the whole converstation needs to single thread again.


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


« July 2016