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

Wednesday Aug 23, 2006

utaction meet gaim-remote

Now that gaim-remote is in build 46 I can shamelessly steal an idea that Darren mentioned to me one lunch time.

Using this short script:

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

I have my status in all the IM sessions that I have automatically set when I remove my card from my Sun Ray and reset when I return.

This assumes you have /opt/SUNWut/bin in your path.

Short and sweet.


Tuesday Jun 06, 2006

Good Morning build 41

Build 41 hit our Sun Ray server (despite me not posting it build 40 had hit the other one two weeks ago).

: IA 1 $; uname -a
SunOS enoexec 5.11 snv_41 sun4u sparc SUNW,Sun-Fire
: IA 2 $;

While most releases the changes are hidden under the bonnet this release has it full in your face with a new version of Gnome. That includes a gaim 2.0 beta and for the first time Firefox and Thunderbird so I no longer run privately built copies.

Whilst I'm sure this will not be news to gnome users who keep up with the external development builds the addition of the Deskbar is just fabulous allowing a single point to start searches from. There are a few niggles, like the launcher for gtkam not finding the binary, the bundled Thunderbird not liking my existing .thunderbird directory but overall it is a leap in the right direction.



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


« June 2016