Skip to content

utaction meet gaim-remote

August 23, 2006

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 & wait

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.


Tags: topic:[solaris] topic:[instant messaging] topic:[Sun Ray]

Advertisements

From → Solaris

utaction meet gaim-remote

August 23, 2006

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 & wait

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.


Tags: topic:[solaris] topic:[instant messaging] topic:[Sun Ray]

From → Solaris

4 Comments
  1. Joel Buckley permalink

    What file would you store this script under to have it automatically work?
    Is there a reverse script required when you return?

  2. I run it by hand since it is only applicable when gaim is running. The script never exits when you kill it the actions stop taking effect.
    However now you mention it having it do:

    pwait $(pgrep -u $LOGNAME -x gaim)
    

    and then kill it’s two children would get it to last only when gaim was running.

  3. Thanks Chris for this beauty.
    Paul Roberts had something similiar using XEmacs, but I didn’t like using xemacs as my chat client.

    /opt/sfw/bin/gnuclient -batch -eval "(jabber-send-presence \"away\" \"$1\" 10)"

    As I don’t have SunRay at Home (how can I get one?) I commonly have to kill the one running in the office and start a fresh when working from home. Thus I have gaimon:

    #!/bin/ksh -p
    if ! pgrep -u $LOGNAME -x gaim >/dev/null; then
    gaim&
    fi
    utaction=$(whence utaction)
    if [[ -z ${utaction} ]]; then
    if [[ -x /opt/SUNWut/bin/utaction ]]; then
    utaction="/opt/SUNWut/bin/utaction"
    else
    print -u2 "utaction command not found!"
    exit 1
    fi
    fi
    ${utaction} -d \
    "gaim-remote 'setstatus?status=away&message=Away from Sun Ray'" \
    > /dev/null 2>&1 &
    a=$!
    ${utaction} -c "gaim-remote 'setstatus?status=available'" > /dev/null 2>&1 &
    b=$!
    pwait $(pgrep -u $LOGNAME -x gaim)
    kill $a
    kill $b
    

    Cheers,
    Stace

  4. [Trackback] 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 irr…

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: