Archive for the ‘Uncategorized’ Category

Banshee and remote irssi

Friday, August 8th, 2008

Ever since I switched to Banshee I've been a bit annoyed that I didn't know how to annoy others by advertising my currently playing song. I always knew the trick for Amarok which Theory posted a long while ago, but had no idea how to adapt this for dbus which Banshee uses. Now, thanks to kees, this has all changed.

In order to get at your currently playing song on Banshee from a SSH connection into your box, just run the following script:

#!/bin/bash

PID=$(pidof mono /usr/lib/banshee-1/Banshee.exe)

if [ -z $PID ]; then
    echo "Banshee doesn't appear to be running"
else
    export DBUS_SESSION_BUS_ADDRESS=\\
        \$(cat /proc/\$PID/environ | xargs -0 -n1 \\
            | grep ^DBUS_SESSION_BUS_ADDRESS= | cut -d= -f2-)
    banshee-1 --query-artist --query-title | cut -d ' ' -f 1 --complement | \\
        sed -n '1h;2,$H;${g;s/\n/ - /g;p}'
fi

It will produce output like so:

laney@chicken:~$ banshee-np.sh
Rancid – Corazon de Oro

Now to get it working remotely, just follow Theory's instructions, replacing

command="dcop --user `whoami` amarok player nowPlaying"

with

command="/path/to/banshee-np.sh"

and you should be good to go!

This post brought to you by my burnt hand, which I have to return to the ice pack every 20 seconds or so. Ouch.

Welcome to 2008

Tuesday, January 1st, 2008

This is me joining in the new years fun. Here are my resolutions for 2008, unordered:

  • Finish degree, get a 1st
  • Get an offer of a PhD place, and take it up in September
  • Go swimming more often
  • Get involved with Ubuntu, try some packaging, maybe MOTU
  • See home friends more

Not many, and not too ambitious, I hope. Except maybe the PhD bit.

Anyways, I'm really enjoying my eee so far. The only things that annoy me a bit are the small keyboard (with weird right shift placement, on the right of the up arrow key, wtf?) and the flakiness of the built in wireless manager, which just seems generally hard to use. Oh, and Thunderbird isn't very enjoyable on such a small screen. Usable though. The folks over at eeeuser.com seem to have done all sorts of crazy things with theirs, and it is fast becoming my first port of call when I want to do anything. After I get back up to uni tomorrow I'll be able to pick up my new SDHC card and RAM and install eeeXubuntu, which should (barring any problems) make it perfect.

Now I'm off to pack and revise. Oh, what joy.