<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Laney's blog &#187; irc</title>
	<atom:link href="http://orangesquash.org.uk/tag/irc/feed/" rel="self" type="application/rss+xml" />
	<link>http://orangesquash.org.uk</link>
	<description>YASB</description>
	<lastBuildDate>Sun, 29 Aug 2010 23:28:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Banshee and remote irssi</title>
		<link>http://orangesquash.org.uk/2008/08/08/banshee-and-remote-irssi/</link>
		<comments>http://orangesquash.org.uk/2008/08/08/banshee-and-remote-irssi/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 21:20:31 +0000</pubDate>
		<dc:creator>Iain</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[rhythmbox]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://orangesquash.org.uk/?p=40</guid>
		<description><![CDATA[Ever since I switched to Banshee I&#039;ve been a bit annoyed that I didn&#039;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 [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since I switched to Banshee I&#039;ve been a bit annoyed that I didn&#039;t know how to annoy others by advertising my currently playing song. I always knew the trick for Amarok which <a title="amarok and irssi" href="http://www.theospears.com/blog/2007/05/22/amarok-and-irssi">Theory</a> posted a long while ago, but had no idea how to adapt this for dbus which Banshee uses. Now, thanks to <a title="dbus session access from remote" href="http://www.outflux.net/blog/archives/2008/08/05/dbus-session-access-from-remote/">kees</a>, this has all changed.</p>
<p>In order to get at your currently playing song on Banshee from a SSH connection into your box, just run the following script:</p>
<pre><code>#!/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</code></pre>
<p>It will produce output like so:</p>
<blockquote><p>laney@chicken:~$ banshee-np.sh<br />
Rancid &#8211; Corazon de Oro</p></blockquote>
<p>Now to get it working remotely, just follow Theory&#039;s instructions, replacing</p>
<p><code>command="dcop --user `whoami` amarok player nowPlaying"</code></p>
<p>with</p>
<p><code>command="/path/to/banshee-np.sh"</code></p>
<p>and you should be good to go!</p>
<p><em>This post brought to you by my burnt hand, which I have to return to the ice pack every 20 seconds or so. Ouch.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://orangesquash.org.uk/2008/08/08/banshee-and-remote-irssi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
