<?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>Allan Willems Joergensen - OnDemand</title>
	<atom:link href="http://www.nowhere.dk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nowhere.dk</link>
	<description>.. I love it when you talk nerdy to me ..</description>
	<lastBuildDate>Sun, 11 Jul 2010 07:11:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>FUSE coolness with mhddfs</title>
		<link>http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs</link>
		<comments>http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs#comments</comments>
		<pubDate>Mon, 24 May 2010 09:22:41 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=870</guid>
		<description><![CDATA[Let&#8217;s say you have three disks but you wish to share with Samba or NFS clients. Of course you could just mount the disks on three separate mount points and export those. Or you could mount the three disks on three mount points inside the same directory and export the parent directory. The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you have three disks but you wish to share with Samba or NFS clients.</p>
<p>Of course you could just mount the disks on three separate mount points and export those. Or you could mount the three disks on three mount points inside the same directory and export the parent directory. The problem with both solutions is you have to &#8220;balance&#8221; the data among the disks &#8211; and it will make navigating your TViX, WDTV or Popcorn more annoying.</p>
<p>You could use RAID or LVM to handle all this for you. But. What if you already have data on the disks? What happens if one of the disks dies? With RAID0 or LVM your data is gone.</p>
<p>Luckily you can have the best of both worlds: <a href="http://svn.uvw.ru/mhddfs/trunk/README">mhddfs</a></p>
<p>mhddfs is a FUSE plugin that combines data from several directories and present it in one directory. The only downside is that you do not know (or control) where a file is created. Let&#8217;s say you combine /dir1, /dir2 and /dir3 under /virtual. Previously you had /dir1/my_content. This is now /virtual/my_content. If you write a file to /virtual/my_content it will not necessarily end up in /dir1/my_content. This also mean you can not predict what data is lost if you lose a disk.</p>
<p>The plugin is available in Ubuntu</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo apt-get install mhddfs</div></div>
<p>Using it is pretty simple</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo mkdir /export/hest<br />
$ sudo mhddfs /dir1,dir2,dir3 /export/hest<br />
[sudo] password for alj: <br />
mhddfs: directory '/dir1' added to list<br />
mhddfs: directory '/dir2' added to list<br />
mhddfs: directory '/dir3' added to list<br />
mhddfs: mount to: /export/hest<br />
mhddfs: move size limit 4294967296 bytes</div></div>
<p>The &#8220;move size limit&#8221; deserves an explanation:</p>
<blockquote><p>
if free space size threshold if a drive has the free space  less  than  the	threshold specifed  then another  drive will be choosen while creating a new file.  If all the drives have free space less than the threshold specified then a drive containing most free space will be choosen.</p>
<p>Default value is 4G, minimum value is 100M.
</p></blockquote>
<p>Now you have the combined space of all three disks</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/dir1;/dir2;/dir3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 589G &nbsp;329G &nbsp;260G &nbsp;56% /export/hest</div></div>
<p>To mount the combined directory during boot, at this to /etc/fstab:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mhddfs#/dir1,/dir2,/dir3 /export/hest fuse defaults,allow_other 0 0</div></div>
<p>You can export the combined directory using NFS or Samba. If you export the combined directory using NFS you need to add the <a href="http://linux.die.net/man/5/exports">fsid option</a> in /etc/exports</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/export/hest 192.168.1.0/24(fsid=2,ro,sync,crossmnt,no_subtree_check,insecure)</div></div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;t=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=FUSE+coolness+with+mhddfs+-+http://aurls.info/f1&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs&amp;summary=Let%27s%20say%20you%20have%20three%20disks%20but%20you%20wish%20to%20share%20with%20Samba%20or%20NFS%20clients.%0D%0A%0D%0AOf%20course%20you%20could%20just%20mount%20the%20disks%20on%20three%20separate%20mount%20points%20and%20export%20those.%20Or%20you%20could%20mount%20the%20three%20disks%20on%20three%20mount%20points%20inside%20the%20same%20directory%20and%20export%20the%20parent%20directory.%20The%20problem&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs&amp;title=FUSE+coolness+with+mhddfs" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/fuse-coolness-with-mhddfs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MoreAdorned MSG template &#8211; now compatible with ThumbGen</title>
		<link>http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen</link>
		<comments>http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen#comments</comments>
		<pubDate>Sat, 01 May 2010 18:39:04 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[WD TV]]></category>
		<category><![CDATA[movie sheet generator]]></category>
		<category><![CDATA[msg]]></category>
		<category><![CDATA[thumbgen]]></category>
		<category><![CDATA[tvixie]]></category>
		<category><![CDATA[wd-tv]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=867</guid>
		<description><![CDATA[I&#8217;ve stumbled upon yet another tool for generating movie sheets compatible with the WDTV: ThumbGen. ThumbGen uses Movie Sheet Generator/TViXie compatible templates, but some of them needs to be tweaked a bit. A user on the WDTV Forum requested an update of the MoreAdorned template &#8211; And luckily the author of ThumbGen delivered. I have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve stumbled upon yet another tool for generating movie sheets compatible with the WDTV:  <a href="http://thumbgen.blogspot.com/">ThumbGen</a>.</p>
<p>ThumbGen uses Movie Sheet Generator/TViXie compatible templates, but some of them needs to be tweaked a bit.</p>
<p>A user on the WDTV Forum requested an update of the MoreAdorned template &#8211; And luckily the author of ThumbGen <a href="http://wdtvforum.com/main/index.php?topic=5952.msg48659#msg48659">delivered</a>.</p>
<p>I have repackaged my copy of MoreAdorned with the updated template XML <a href="http://dl.dropbox.com/u/262048/www.nowhere.dk/files/MoreAdorned_updated_by_ALJ.zip">here</a> </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;t=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen+-+http://aurls.info/cy&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen&amp;summary=I%27ve%20stumbled%20upon%20yet%20another%20tool%20for%20generating%20movie%20sheets%20compatible%20with%20the%20WDTV%3A%20%20ThumbGen.%0D%0A%0D%0AThumbGen%20uses%20Movie%20Sheet%20Generator%2FTViXie%20compatible%20templates%2C%20but%20some%20of%20them%20needs%20to%20be%20tweaked%20a%20bit.%0D%0A%0D%0AA%20user%20on%20the%20WDTV%20Forum%20requested%20an%20update%20of%20the%20MoreAdorned%20template%20-%20And%20lucki&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen&amp;title=MoreAdorned+MSG+template+-+now+compatible+with+ThumbGen" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/moreadorned-template-now-compatible-with-thumbgen/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Fixing character encoding in Terminator 0.14 (Ubuntu 10.04)</title>
		<link>http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04</link>
		<comments>http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04#comments</comments>
		<pubDate>Mon, 29 Mar 2010 18:32:14 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[terminal emulator]]></category>
		<category><![CDATA[terminator]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=857</guid>
		<description><![CDATA[I&#8217;ve been using the excellent terminal emulator Terminator for a long time. Terminator sports (among other things) split screen hand &#8220;cluster support&#8221; (grouping of screens, making it possible to type the same thing in all terminals). In previous versions of Ubuntu (Terminator versions prior to 0.14) Terminator would pick all settings from GNOME Terminal, including [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the excellent terminal emulator <a href="http://www.tenshu.net/terminator/">Terminator</a> for a long time. Terminator sports (among other things) split screen hand &#8220;cluster support&#8221; (grouping of screens, making it possible to type the same thing in all terminals).</p>
<p><a href="http://www.nowhere.dk/wp-content/uploads/2010/03/terminator.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/03/terminator-300x247.png" alt="Example" title="Terminator" width="300" height="247" class="aligncenter size-medium wp-image-858" /></a></p>
<p>In previous versions of Ubuntu (Terminator versions prior to 0.14) Terminator would pick all settings from GNOME Terminal, including character encoding (ISO-8859-15 in my case). Apparently this is no longer the case in Ubuntu 10.04, which has Terminator 0.14.</p>
<p>To use another encoding than UTF-8, add the following to <em>~/.config/terminator/config:</em></p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">encoding = ISO-8859-15</div></div>
<p>Substitute ISO-8859-15 with whatever encoding you want.</p>
<p>Some other nice configuration options</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">scrollback_lines = 10000 # Scroll back size<br />
focus = sloppy # sloppy focus, ie. the focus follows the mouse when moving the pointer to another split-screen</div></div>
<p>for more options, run <em>man terminator_config</em>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;t=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29+-+http://aurls.info/dk&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29&amp;summary=I%27ve%20been%20using%20the%20excellent%20terminal%20emulator%20Terminator%20for%20a%20long%20time.%20Terminator%20sports%20%28among%20other%20things%29%20split%20screen%20hand%20%22cluster%20support%22%20%28grouping%20of%20screens%2C%20making%20it%20possible%20to%20type%20the%20same%20thing%20in%20all%20terminals%29.%0D%0A%0D%0A%0D%0A%0D%0AIn%20previous%20versions%20of%20Ubuntu%20%28Terminator%20versions%20prior%20t&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04&amp;title=Tip%3A+Fixing+character+encoding+in+Terminator+0.14+%28Ubuntu+10.04%29" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/tip-fixing-character-encoding-in-terminator-0-14-ubuntu-10-04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Moving the titlebar buttons back where they belong in Ubuntu 10.04</title>
		<link>http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04</link>
		<comments>http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04#comments</comments>
		<pubDate>Sun, 28 Mar 2010 23:09:16 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=855</guid>
		<description><![CDATA[I&#8217;m not going to dwell on the subject &#8211; The Ubuntu Design team (and in the end Mark Shuttleworth) decided to change the titlebar button layout as part of the new Light GNOME theme (which is a really nice theme); for more information read this article Being the good Ubuntu fanboy that I am, I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not going to dwell on the subject &#8211; The Ubuntu Design team (and in the end Mark Shuttleworth) decided to change the titlebar button layout as part of the new Light GNOME theme (which is a really nice theme); for more information <a href="http://itmanagement.earthweb.com/osrc/article.php/3872231/Ubuntu-Buttons-and-Democracy.htm">read this article</a></p>
<p>Being the good Ubuntu fanboy that I am, I have really tried to embrace this new layout &#8211; But every time I move the mouse pointer to the right side of the window only to find the close button missing, I grew increasingly frustrated.</p>
<p>Luckily <a href="http://aurls.info/77">the fix is easy</a>.</p>
<p>From a terminal (or from the run prompt, ALT-F2), run</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close</div></div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;t=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04+-+http://aurls.info/e4&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04&amp;summary=I%27m%20not%20going%20to%20dwell%20on%20the%20subject%20-%20The%20Ubuntu%20Design%20team%20%28and%20in%20the%20end%20Mark%20Shuttleworth%29%20decided%20to%20change%20the%20titlebar%20button%20layout%20as%20part%20of%20the%20new%20Light%20GNOME%20theme%20%28which%20is%20a%20really%20nice%20theme%29%3B%20for%20more%20information%20read%20this%20article%0D%0A%0D%0ABeing%20the%20good%20Ubuntu%20fanboy%20that%20I%20am%2C%20I%20have&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04&amp;title=Tip%3A+Moving+the+titlebar+buttons+back+where+they+belong+in+Ubuntu+10.04" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/tip-moving-the-titlebar-buttons-back-where-they-belong-in-ubuntu-10-04/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tip: How to fix the ATI driver when upgrading Ubuntu 9.10 to 10.04</title>
		<link>http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04</link>
		<comments>http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04#comments</comments>
		<pubDate>Sun, 28 Mar 2010 19:37:49 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[fglrx]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[opengl]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=851</guid>
		<description><![CDATA[I decided to upgrade my laptop to 10.04 beta 1. When the update was done (something I had to do at home because the damn Update Manager does not work with proxies, at least not when running it manually) I was left without a working Xorg configuration, apparently because the fglrx (non-free) ATI driver did [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to upgrade my laptop to 10.04 beta 1.</p>
<p>When the update was done (something I had to do at home because the damn Update Manager does not work with proxies, at least not when running it manually) I was left without a working Xorg configuration, apparently because the fglrx (non-free) ATI driver <a href="https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/494699">did not support the x-server used in Lucid</a>. According to the release notes, the fix is the use the open source driver (ati) instead.</p>
<p>After fiddling a bit, I discovered that removing <em>xorg-driver-fglrx</em> and installing the package <em>fglrx</em> did in fact work and I have accelerated OpenGL again.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;t=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04+-+http://aurls.info/e7&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04&amp;summary=I%20decided%20to%20upgrade%20my%20laptop%20to%2010.04%20beta%201.%0D%0A%0D%0AWhen%20the%20update%20was%20done%20%28something%20I%20had%20to%20do%20at%20home%20because%20the%20damn%20Update%20Manager%20does%20not%20work%20with%20proxies%2C%20at%20least%20not%20when%20running%20it%20manually%29%20I%20was%20left%20without%20a%20working%20Xorg%20configuration%2C%20apparently%20because%20the%20fglrx%20%28non-free%29%20ATI%20d&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04&amp;title=Tip%3A+How+to+fix+the+ATI+driver+when+upgrading+Ubuntu+9.10+to+10.04" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/tip-how-to-fix-the-ati-driver-when-upgrading-ubuntu-9-10-to-10-04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>www.nowhere.dk is now IPv6 enabled</title>
		<link>http://www.nowhere.dk/articles/ipv6</link>
		<comments>http://www.nowhere.dk/articles/ipv6#comments</comments>
		<pubDate>Sat, 13 Mar 2010 12:45:46 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[ufw]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=842</guid>
		<description><![CDATA[Just a quick note to let you know that www.nowhere.dk is now accessible through IPv6 $ host -t AAAA www.nowhere.dk www.nowhere.dk &#160; &#160; &#160;&#160; &#160; CNAME &#160; coredump.nowhere.dk coredump.nowhere.dk &#160; &#160; AAAA&#160; &#160; 2001:2010:0:2:0:0:0:DEAD The only thing I had to do was to enable IPv6 in Lighttpd, enable IPv6 in ufw (done in /etc/default/ufw) and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nowhere.dk/wp-content/uploads/2010/03/IPv6_ready_logo_phase1.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/03/IPv6_ready_logo_phase1-150x150.png" alt="IPv6 ready" title="IPv6_ready_logo_phase1" width="150" height="150" class="alignleft size-thumbnail wp-image-848" /></a>Just a quick note to let you know that www.nowhere.dk is now accessible through IPv6</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ host -t AAAA www.nowhere.dk<br />
www.nowhere.dk &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; CNAME &nbsp; coredump.nowhere.dk<br />
coredump.nowhere.dk &nbsp; &nbsp; AAAA&nbsp; &nbsp; 2001:2010:0:2:0:0:0:DEAD</div></div>
<p>The only thing I had to do was to <a href="http://www.cyberciti.biz/tips/linux-unix-lighttpd-ipv6-support.html">enable IPv6 in Lighttpd</a>, enable IPv6 in ufw (done in <em>/etc/default/ufw</em>) and then re-add any rules to ufw that affect IPv6 (like web and ssh). The last part is crucial and not very well documented. </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/ipv6&amp;t=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=www.nowhere.dk+is+now+IPv6+enabled+-+http://aurls.info/e6&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/ipv6/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/ipv6&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled&amp;summary=Just%20a%20quick%20note%20to%20let%20you%20know%20that%20www.nowhere.dk%20is%20now%20accessible%20through%20IPv6%0D%0A%0D%0A%5Bcc%5D%0D%0A%24%20host%20-t%20AAAA%20www.nowhere.dk%0D%0Awww.nowhere.dk%20%20%20%20%20%20%09CNAME%09coredump.nowhere.dk%0D%0Acoredump.nowhere.dk%20%09AAAA%092001%3A2010%3A0%3A2%3A0%3A0%3A0%3ADEAD%0D%0A%5B%2Fcc%5D%0D%0A%0D%0AThe%20only%20thing%20I%20had%20to%20do%20was%20to%20enable%20IPv6%20in%20Lighttpd%2C%20enable%20&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/ipv6&amp;title=www.nowhere.dk+is+now+IPv6+enabled" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/ipv6" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/ipv6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irssi notifications in Windows using Growl and Minivan</title>
		<link>http://www.nowhere.dk/articles/irssi-notifications-windows</link>
		<comments>http://www.nowhere.dk/articles/irssi-notifications-windows#comments</comments>
		<pubDate>Sat, 06 Mar 2010 14:21:28 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[issi]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=802</guid>
		<description><![CDATA[After completing my script to deliver Irssi notifications to the Linux desktop using Perl (IPC::Message::Minivan and Desktop::Notify), I wondered if this framework could be extended to Windows (since I have a Windows desktop at work). I have previously looked at Growl (on Linux) and think it is cumbersome to get the notifications across the network [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nowhere.dk/wp-content/uploads/2010/03/lilitux-tux-bricoleur.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/03/lilitux-tux-bricoleur-150x150.png" alt="" title="lilitux-tux-bricoleur" width="150" height="150" class="alignright size-thumbnail wp-image-819" /></a>After completing my script to <a href="http://www.nowhere.dk/articles/irssi-notifications-minivan">deliver Irssi notifications to the Linux desktop</a> using Perl (IPC::Message::Minivan and Desktop::Notify), I wondered if this framework could be extended to Windows (since I have a Windows desktop at work).</p>
<p>I have previously looked at Growl (on Linux) and think it is cumbersome to get the notifications across the network &#8211; but ended up using it anyway since it&#8217;s an easy way to display notifications in Windows (and probably in MacOS as well). There is a <a href="http://github.com/kfdm/irssi-growl">another Growl script for Irssi</a> but I wanted to make my own that plugs into Minivan because I wanted the pop ups to look the same on all computers (at least the wording).</p>
<p><strong>On Windows</strong></p>
<ol>
<li><a href="http://www.growlforwindows.com/gfw/default.aspx">Download Grow for Windows</a> and install it.</li>
<li>Download <a href="http://nemesis2.qx.net/pages/MyEnTunnel">MyEnTunnel</a> and install it.</li>
<li>If you haven&#8217;t already (which I am guessing you have) then <a href="http://aurls.info/4n">download Putty SSH client</a> and install it</li>
<li>Configure MyEnTunnel to match your configuration, create a remote tunnel: <em>&lt;random port number&gt;:localhost:23053</em> &#8211; The random port is important and will be used later</li>
</ol>
<p><strong>On the server running Irssi</strong></p>
<ol>
<li>Install the Minivan &#8211; See <a href="http://www.nowhere.dk/articles/irssi-notifications-minivan">this article</a></li>
<li>Install Growl::GNTP
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libcrypt-cbc-perl libdata-uuid-perl<br />
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-MCPAN</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'Growl::GNTP'</span></div></div>
</li>
<li>Install the script
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The IRC icon is from here: http://aurls.info/4o</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Encode<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Growl<span style="color: #339933;">::</span><span style="color: #006600;">GNTP</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Data<span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">;</span><br />
<br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$#ARGV</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;Usage: irssi-notify-growl.pl &lt;port number&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/exit.html"><span style="color: #000066;">exit</span></a><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$port</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$van</span> <span style="color: #339933;">=</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>host <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$van</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">subscribe</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;#irssi&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$growl</span> <span style="color: #339933;">=</span> Growl<span style="color: #339933;">::</span><span style="color: #006600;">GNTP</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; AppName <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;Irssi&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; PeerHost <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;localhost&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; PeerPort <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$port</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Password <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; AppIcon <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;http://dl.dropbox.com/u/262048/www.nowhere.dk/files/irc.png&quot;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$growl</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">register</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span> Name <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;irssi&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$growl</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">notify</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Event <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;irssi&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Title <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;Minivan&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;Connection established&quot;</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$van</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$cmd</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'#irssi'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$c</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$cmd</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>msg<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$summary</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>summary<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$growl</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">notify</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Event <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;irssi&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Title <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$message</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Copy <a href="http://github.com/nowheredk/www/blob/master/irssi-notify-growl.pl">the script</a> to <em>~/bin/irssi-notify-growl.pl</em>.</li>
<li>Make the script executable and run it as
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">irssi-notify-growl.pl &lt;port number&gt;</div></div>
<p>The port number is the one you chose on the Windows machine for your remote tunnel &#8211; You need to run an instance of the script for each Growl-client.
</ol>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;t=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Irssi+notifications+in+Windows+using+Growl+and+Minivan+-+http://aurls.info/dz&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/irssi-notifications-windows/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan&amp;summary=After%20completing%20my%20script%20to%20deliver%20Irssi%20notifications%20to%20the%20Linux%20desktop%20using%20Perl%20%28IPC%3A%3AMessage%3A%3AMinivan%20and%20Desktop%3A%3ANotify%29%2C%20I%20wondered%20if%20this%20framework%20could%20be%20extended%20to%20Windows%20%28since%20I%20have%20a%20Windows%20desktop%20at%20work%29.%0D%0A%0D%0AI%20have%20previously%20looked%20at%20Growl%20%28on%20Linux%29%20and%20think%20it%20is%20c&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/irssi-notifications-windows&amp;title=Irssi+notifications+in+Windows+using+Growl+and+Minivan" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/irssi-notifications-windows" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/irssi-notifications-windows/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Irssi notifications using Desktop Notifications and Minivan</title>
		<link>http://www.nowhere.dk/articles/irssi-notifications-minivan</link>
		<comments>http://www.nowhere.dk/articles/irssi-notifications-minivan#comments</comments>
		<pubDate>Sat, 06 Mar 2010 09:02:43 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=784</guid>
		<description><![CDATA[I was pretty happy with solution to get notifications from Irssi though it had some shortcomings. A couple of days ago a colleague made me aware of a Perl modules written by another colleague (Anton Berezin) called IPC::Message::Minivan which, it turns out, is perfect for my notification script. Basing the notifications on Minivan combine the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nowhere.dk/wp-content/uploads/2010/03/pusio-radiograph-tv.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/03/pusio-radiograph-tv-300x300.png" alt="" title="pusio-radiograph-tv" width="300" height="300" class="alignright size-medium wp-image-794" /></a>I was pretty happy with <a href="http://www.nowhere.dk/articles/irssi-notifications">solution to get notifications from Irssi</a> though it had some shortcomings. </p>
<p>A couple of days ago a colleague made me aware of a Perl modules written by another colleague (<a href="http://blog.tobez.org/">Anton Berezin</a>) called <a href="http://search.cpan.org/~gruber/IPC-Message-Minivan-0.01_08/">IPC::Message::Minivan</a> which, it turns out, is perfect for my notification script. Basing the notifications on Minivan combine the speed of using something like Dbus locally (instant notifications) with the convenience of my previous script (notifications over the network, able to handle multiple clients).</p>
<p>This setup consists of three parts: The Minivan daemon, the Irssi script and the notification script.</p>
<p>As always my instructions are based on Ubuntu but should work on most Linux and Unix systems.</p>
<p><strong>Installing the Minivan</strong></p>
<p>IPC::Message::Minivan is not yet available directly through CPAN so we need to install it manually</p>
<ol>
<li>Download <a href="http://search.cpan.org/CPAN/authors/id/G/GR/GRUBER/IPC-Messaging-0.01_12.tar.gz">IPC::Messaging</a> and <a href="http://search.cpan.org/CPAN/authors/id/G/GR/GRUBER/IPC-Message-Minivan-0.01_08.tar.gz">IPC::Message::Minivan</a> (and unpack them).</li>
<li>Install dependencies: <em>sudo apt-get install libjson-xs-perl libregexp-common-perl</em></li>
<li>One could use <em>dh-make-perl</em> but I chose to install the two modules manually<br />Basically run &#8220;perl Makefile.pl &#038;&#038; sudo make install
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:~<span style="color: #000000; font-weight: bold;">/</span>devel<span style="color: #000000; font-weight: bold;">/</span>IPC-Messaging-<span style="color: #000000;">0.01</span>_12$ <span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL<br />
Cannot determine license info from lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging.pm<br />
<span style="color: #000000; font-weight: bold;">***</span> Module::AutoInstall version <span style="color: #000000;">1.03</span><br />
<span style="color: #000000; font-weight: bold;">***</span> Checking <span style="color: #000000; font-weight: bold;">for</span> Perl dependencies...<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Core Features<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
- Test::More &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.72</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- B::Generate &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...missing.<br />
- IO::Socket::UNIX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.23</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- IO::Socket::INET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.31</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- Storable &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2.18</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- Time::HiRes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.9711</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- IO::Select &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1.17</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
- Module::Load::Conditional ...loaded. <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.22</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
==<span style="color: #000000; font-weight: bold;">&gt;</span> Auto-install the <span style="color: #000000;">1</span> mandatory module<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> from CPAN? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #7a0874; font-weight: bold;">&#93;</span> y<br />
<span style="color: #000000; font-weight: bold;">***</span> Dependencies will be installed the next <span style="color: #000000; font-weight: bold;">time</span> you <span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #ff0000;">'make'</span>.<br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">&#40;</span>You may need to <span style="color: #000000; font-weight: bold;">do</span> that <span style="color: #c20cb9; font-weight: bold;">as</span> the <span style="color: #ff0000;">'root'</span> user.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">***</span> Module::AutoInstall configuration finished.<br />
Checking <span style="color: #000000; font-weight: bold;">if</span> your kit is complete...<br />
Looks good<br />
Warning: prerequisite B::Generate <span style="color: #000000;">0</span> not found.<br />
Writing Makefile <span style="color: #000000; font-weight: bold;">for</span> IPC::Messaging<br />
:~<span style="color: #000000; font-weight: bold;">/</span>devel<span style="color: #000000; font-weight: bold;">/</span>IPC-Messaging-<span style="color: #000000;">0.01</span>_12$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">sudo</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> password <span style="color: #000000; font-weight: bold;">for</span> alj: <br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #ff0000;">&quot;-Iinc&quot;</span> Makefile.PL <span style="color: #660033;">--config</span>= <span style="color: #660033;">--installdeps</span>=B::Generate,<span style="color: #000000;">0</span><br />
Cannot determine license info from lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging.pm<br />
<span style="color: #000000; font-weight: bold;">***</span> Installing dependencies...<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MSG<span style="color: #7a0874; font-weight: bold;">&#93;</span> No <span style="color: #ff0000;">'/home/alj/.cpanplus/custom-sources'</span> <span style="color: #c20cb9; font-weight: bold;">dir</span>, skipping custom sources<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MSG<span style="color: #7a0874; font-weight: bold;">&#93;</span> No <span style="color: #ff0000;">'/home/alj/.cpanplus/custom-sources'</span> <span style="color: #c20cb9; font-weight: bold;">dir</span>, skipping custom sources<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>MSG<span style="color: #7a0874; font-weight: bold;">&#93;</span> No <span style="color: #ff0000;">'/home/alj/.cpanplus/custom-sources'</span> <span style="color: #c20cb9; font-weight: bold;">dir</span>, skipping custom sources<br />
<span style="color: #000000; font-weight: bold;">***</span> Installing B::Generate...<br />
Running <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>cpanp-run-perl <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>alj<span style="color: #000000; font-weight: bold;">/</span>.cpanplus<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>B-Generate-<span style="color: #000000;">1.26</span><span style="color: #000000; font-weight: bold;">/</span>Makefile.PL <span style="color: #007800;">INSTALLDIRS</span>=site<span style="color: #7a0874; font-weight: bold;">&#93;</span>...<br />
<span style="color: #666666; font-style: italic;"># running Build.PL installdirs=site</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">perl</span> Build.PL <span style="color: #007800;">installdirs</span>=site<br />
Creating custom builder _build<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>My<span style="color: #000000; font-weight: bold;">/</span>Builder.pm <span style="color: #000000; font-weight: bold;">in</span> _build<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>My<br />
Checking whether your kit is complete...<br />
Looks good<br />
<br />
Checking prerequisites...<br />
Looks good<br />
<br />
Creating new <span style="color: #ff0000;">'Build'</span> script <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'B-Generate'</span> version <span style="color: #ff0000;">'1.26'</span><br />
Unknown <span style="color: #ff0000;">'build_class'</span>, defaulting to <span style="color: #ff0000;">'Module::Build'</span><br />
Running <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #007800;">UNINST</span>=<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>...<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Entering directory <span style="color: #000000; font-weight: bold;">`/</span>home<span style="color: #000000; font-weight: bold;">/</span>alj<span style="color: #000000; font-weight: bold;">/</span>.cpanplus<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>B-Generate-<span style="color: #000000;">1.26</span><span style="color: #ff0000;">'<br />
/usr/bin/perl Build --makefile_env_macros 1 test<br />
t/basic............ok<br />
&nbsp; &nbsp; &nbsp; &nbsp; 2/10 skipped: various reasons<br />
t/inspect-btest....ok<br />
t/inspect-this.....ok<br />
t/new_cv...........ok<br />
t/op_list..........ok<br />
t/op_list_bgen.....ok<br />
All tests successful, 2 subtests skipped.<br />
Files=6, Tests=721, &nbsp;0 wallclock secs ( 0.24 cusr + &nbsp;0.21 csys = &nbsp;0.45 CPU)<br />
make[1]: Leaving directory `/home/alj/.cpanplus/5.10.0/build/B-Generate-1.26'</span><br />
<span style="color: #000000; font-weight: bold;">***</span> B::Generate successfully installed.<br />
<span style="color: #000000; font-weight: bold;">***</span> Module::AutoInstall installation finished.<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging.pm blib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging.pm<br />
Manifying blib<span style="color: #000000; font-weight: bold;">/</span>man3<span style="color: #000000; font-weight: bold;">/</span>IPC::Messaging.3pm<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging.pm<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man3<span style="color: #000000; font-weight: bold;">/</span>IPC::Messaging.3pm<br />
Writing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>auto<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Messaging<span style="color: #000000; font-weight: bold;">/</span>.packlist<br />
Appending installation info to <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>perllocal.pod<br />
:~<span style="color: #000000; font-weight: bold;">/</span>devel<span style="color: #000000; font-weight: bold;">/</span>IPC-Message-Minivan-<span style="color: #000000;">0.01</span>_08$ <span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL<br />
Cannot determine license info from lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Message<span style="color: #000000; font-weight: bold;">/</span>Minivan.pm<br />
Writing Makefile <span style="color: #000000; font-weight: bold;">for</span> IPC::Message::Minivan<br />
:~<span style="color: #000000; font-weight: bold;">/</span>devel<span style="color: #000000; font-weight: bold;">/</span>IPC-Message-Minivan-<span style="color: #000000;">0.01</span>_08$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Message<span style="color: #000000; font-weight: bold;">/</span>Minivan.pm blib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Message<span style="color: #000000; font-weight: bold;">/</span>Minivan.pm<br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> minivan blib<span style="color: #000000; font-weight: bold;">/</span>script<span style="color: #000000; font-weight: bold;">/</span>minivan<br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #ff0000;">&quot;-Iinc&quot;</span> <span style="color: #ff0000;">&quot;-MExtUtils::MY&quot;</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;MY-&gt;fixin(shift)&quot;</span> blib<span style="color: #000000; font-weight: bold;">/</span>script<span style="color: #000000; font-weight: bold;">/</span>minivan<br />
Manifying blib<span style="color: #000000; font-weight: bold;">/</span>man1<span style="color: #000000; font-weight: bold;">/</span>minivan.1p<br />
Manifying blib<span style="color: #000000; font-weight: bold;">/</span>man3<span style="color: #000000; font-weight: bold;">/</span>IPC::Message::Minivan.3pm<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Message<span style="color: #000000; font-weight: bold;">/</span>Minivan.pm<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man1<span style="color: #000000; font-weight: bold;">/</span>minivan.1p<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man3<span style="color: #000000; font-weight: bold;">/</span>IPC::Message::Minivan.3pm<br />
Installing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>minivan<br />
Writing <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>auto<span style="color: #000000; font-weight: bold;">/</span>IPC<span style="color: #000000; font-weight: bold;">/</span>Message<span style="color: #000000; font-weight: bold;">/</span>Minivan<span style="color: #000000; font-weight: bold;">/</span>.packlist<br />
Appending installation info to <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>5.10.0<span style="color: #000000; font-weight: bold;">/</span>perllocal.pod</div></div>
</li>
<li>Create an Upstart script for the Minivan daemon
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>minivan.conf<br />
<span style="color: #666666; font-style: italic;"># minivan - minimalistic message bus</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<br />
description &nbsp; &nbsp; <span style="color: #ff0000;">&quot;minimalistic message bus&quot;</span><br />
<br />
start on runlevel <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2345</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
stop on runlevel <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #000000;">2345</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<br />
expect fork<br />
respawn<br />
<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>minivan <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>minivan <span style="color: #660033;">-d</span></div></div>
</li>
<li>Start the Minivan daemon
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo start minivan</div></div>
</li>
</ol>
<p><strong>Install the Irssi script</strong></p>
<ol>
<li>Copy <a href="http://github.com/nowheredk/www/blob/master/notifier-minivan.pl">the script</a> to <em>~/.irssi/scripts/notifier-minivan.pl</em> (the script below is just for reference, it might not be up to date)
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">## Put me in ~/.irssi/scripts, and then execute the following in irssi:</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<span style="color: #666666; font-style: italic;">## &nbsp; &nbsp; &nbsp; /load perl</span><br />
<span style="color: #666666; font-style: italic;">## &nbsp; &nbsp; &nbsp; /script load notifier-minivan</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Irssi<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> vars <a href="http://perldoc.perl.org/functions/qw.html"><span style="color: #000066;">qw</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$VERSION</span> <span style="color: #0000ff;">%IRSSI</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$VERSION</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;0.01&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">%IRSSI</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; authors &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Allan Willems Joergensen'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; origauthors <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Luke Macken, Paul W. Frields, Jared Quinn, Anton Berezin, Kristoffer Larsen'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; contact &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'allan@nowhere,dk'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; name &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'notifier-minivan.pl'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; description <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Alert the user of new messages or hilights through IPC::Message::Minivan'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; license &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Beerware'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; url &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'http://www.nowhere.dk/articles/irssi-notifications-minivan'</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Default settings in Irssi</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'minivan_host'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'minivan_port'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6826</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'minivan_channel'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'#irssi'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Fetch settings from Irssi</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$minivan_host</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'minivan_host'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$minivan_port</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'minivan_port'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$minivan_channel</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'minivan_channel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Connect to the Minivan</span><br />
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$van</span> <span style="color: #339933;">=</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>host <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$minivan_host</span><span style="color: #339933;">,</span> port <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$minivan_port</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Encode certain characters using HTML</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$safemsg</span> <span style="color: #339933;">=</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">::</span><span style="color: #006600;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'&lt;&gt;&amp;&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Load everyone into the minivan</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$van</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">msg</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$minivan_channel</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>summary <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> msg <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$safemsg</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> print_text_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dest</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$text</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$stripped</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$server</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>server<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$server</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>level<span style="color: #009900;">&#125;</span> <span style="color: #339933;">&amp;</span> MSGLEVEL_HILIGHT<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sender</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stripped</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sender</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\&lt;.([^\&gt;]+)\&gt;.+/\1/</span> <span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$stripped</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\&lt;.[^\&gt;]+\&gt;.//</span> <span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$summary</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Hilite in &quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>target<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$stripped</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> message_private_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$msg</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$nick</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$address</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$server</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Private message from &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$nick</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> dcc_request_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dcc</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$sendaddr</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$server</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>server<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$dcc</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DCC &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>type<span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot; request&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>nick<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'print text'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'print_text_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'message private'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'message_private_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'dcc request'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'dcc_request_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
</li>
<li>Load the script inside Irssi: <em>/script load notifier-minivan.pl</em></li>
<li>If your Minivan is not running on the same machine as Irssi, change the configuration inside Irssi:<br /> <em>/set minivan_host your_hostname</em> &#8211; IPC::Message::Minivan is tunnel-able through ssh, see client configuration</li>
<li>Auto-load the script:<br /> <em>ln -sf ~/.irssi/scripts/notifier-minivan.pl  ~/.irssi/scripts/autoload/notifier-minivan.pl</em></li>
</ol>
<p><strong>The stuff running on your local machine</strong></p>
<p>It is possible to use <a href="http://www.harding.motd.ca/autossh/">autossh</a> to automatically setup the tunnel but since I am always connected to my server (at least when I am in front of a computer) I chose to use normal ssh port forwarding.</p>
<p>In <em>~/.ssh/config</em> I have</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Host my.server.bogus<br />
&nbsp; &nbsp; &nbsp; &nbsp; LocalForward 6826 localhost:6826</div></div>
<p>The stuff that actually shows the notifications</p>
<p>I did not want to bother trying to make the script error proof so I simply call the Perl script from a <a href="http://github.com/nowheredk/www/blob/master/start-irssi-notify-client.sh">shell script</a> like so</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #007800;">wait</span>=<span style="color: #000000;">0</span><br />
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; &nbsp; <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>irssi-notify-client.pl<br />
<br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #007800;">wait</span>=<span style="color: #007800;">$wait</span>+<span style="color: #000000;">5</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$wait</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">30</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">30</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #007800;">$wait</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>Save <a href="http://github.com/nowheredk/www/blob/master/start-irssi-notify-client.sh">the script</a> as <em>~/bin/start-irssi-notify-client.sh</em></p>
<p>The notification script requires Desktop::Notify &#8211; It is available in the Ubuntu repositories but it is an old version, so let&#8217;s use a newer:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo apt-get install dh-make-perl libnet-dbus-perl<br />
$ cpan2deb Desktop::Notify<br />
$ sudo dpkg -i ~/.cpan/libdesktop-notify-perl*.deb</div></div>
<p><a href="http://github.com/nowheredk/www/blob/master/irssi-notify-client.pl">The script</a></p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Desktop<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Encode<span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$notify_timeout</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">500</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$icon</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/usr/share/pixmaps/pidgin/protocols/scalable/irc.svg&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">#my $icon = &quot;gnome-irc.png&quot;;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$van</span> <span style="color: #339933;">=</span> IPC<span style="color: #339933;">::</span><span style="color: #006600;">Message</span><span style="color: #339933;">::</span><span style="color: #006600;">Minivan</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>host <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$van</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">subscribe</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;#irssi&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">our</span> <span style="color: #0000ff;">$notify</span> <span style="color: #339933;">=</span> Desktop<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$notification</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$notify</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">create</span><span style="color: #009900;">&#40;</span>summary <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Minivan'</span><span style="color: #339933;">,</span> body <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Connection established'</span><span style="color: #339933;">,</span> timeout <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$notify_timeout</span><span style="color: #339933;">,</span> app_icon <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$icon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$van</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$cmd</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'#irssi'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$c</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$cmd</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$message</span> <span style="color: #339933;">=</span> Encode<span style="color: #339933;">::</span><span style="color: #006600;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>msg<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$summary</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>summary<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">summary</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$summary</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">body</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Copy <a href="http://github.com/nowheredk/www/blob/master/irssi-notify-client.pl">the script</a> to <em>~/bin/irssi-notify-client.pl</em>.</p>
<p>Remember to make both scripts executable.</p>
<p>The final thing to do is to add the notify client to your desktop environment&#8217;s autostart</p>
<p>In GNOME: System -> Preferences -> Startup Applications<br />
<div id="attachment_761" class="wp-caption alignleft" style="width: 341px"><a href="http://www.nowhere.dk/wp-content/uploads/2010/02/Screenshot-Add-Startup-Program.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/02/Screenshot-Add-Startup-Program.png" alt="Add Startup Program" title="Add Startup Program" width="331" height="154" class="size-full wp-image-761" /></a><p class="wp-caption-text">Add Startup Program</p></div></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;t=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Irssi+notifications+using+Desktop+Notifications+and+Minivan+-+http://aurls.info/dq&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/irssi-notifications-minivan/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan&amp;summary=I%20was%20pretty%20happy%20with%20solution%20to%20get%20notifications%20from%20Irssi%20though%20it%20had%20some%20shortcomings.%20%0D%0A%0D%0AA%20couple%20of%20days%20ago%20a%20colleague%20made%20me%20aware%20of%20a%20Perl%20modules%20written%20by%20another%20colleague%20%28Anton%20Berezin%29%20called%20IPC%3A%3AMessage%3A%3AMinivan%20which%2C%20it%20turns%20out%2C%20is%20perfect%20for%20my%20notification%20script.&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/irssi-notifications-minivan&amp;title=Irssi+notifications+using+Desktop+Notifications+and+Minivan" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/irssi-notifications-minivan" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/irssi-notifications-minivan/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Facebook Chat in bitlbee</title>
		<link>http://www.nowhere.dk/articles/facebook-chat-in-bitlbee</link>
		<comments>http://www.nowhere.dk/articles/facebook-chat-in-bitlbee#comments</comments>
		<pubDate>Fri, 12 Feb 2010 12:37:21 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bitlbee]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=770</guid>
		<description><![CDATA[Facebook now supports XMPP. Yay. Using Facebook Chat in bitlbee is pretty straight forward (I am running 1.2.4, older versions of bitlbee require a bit more tweaking, consult the manual). For Facebook Chat through XMPP to work you need to set a Facebook username. In the &#038;bitlbee channel account add jabber &#60;username&#62;@chat.facebook.com&#62; &#60;Facebook password&#62; account [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dl.dropbox.com/u/262048/www.nowhere.dk/images/judipich-crazy.png"><img alt="" src="http://dl.dropbox.com/u/262048/www.nowhere.dk/images/judipich-crazy.png" title="Crazy" class="alignright" width="256" height="256" /></a><a href="http://www.facebook.com/sitetour/chat.php">Facebook now supports XMPP</a>. Yay.</p>
<p>Using Facebook Chat in bitlbee is pretty straight forward (I am running 1.2.4, older versions of bitlbee require a bit more tweaking, consult the manual). </p>
<p>For Facebook Chat through XMPP to work you need to set a <a href="http://www.facebook.com/username/">Facebook username</a>.</p>
<p>In the &#038;bitlbee channel</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">account add jabber &lt;username&gt;@chat.facebook.com&gt; &lt;Facebook password&gt;<br />
account on</div></div>
<p>that&#8217;s it.</p>
<p>Facebook users are listed by their Facebook user id (uXXXXXXX) so you have to rename them manually, unless you are using irssi.</p>
<p>Download <a href="http://github.com/avar/dotfiles/blob/master/.irssi/scripts/bitlbee_rename.pl">this script</a> to <em>~/.irssi/scripts</em> and load it</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/script load bitlbee_rename</div></div>
<p>(Note: This script only renames your Facebook contacts &#8211; The original version which renames all contact but does not handle international characters really well is available <a href="http://a.ngus.net/bitlbee_rename.pl">here</a>)</p>
<p>Now each of your contacts will be renamed based on their real name in their vCard.</p>
<p>Remember to symlink to script to <em>~/.irssi/scripts/autorun</em> if you wish to auto-load it.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;t=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Facebook+Chat+in+bitlbee+-+http://aurls.info/dx&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/facebook-chat-in-bitlbee/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee&amp;summary=Facebook%20now%20supports%20XMPP.%20Yay.%0D%0A%0D%0AUsing%20Facebook%20Chat%20in%20bitlbee%20is%20pretty%20straight%20forward%20%28I%20am%20running%201.2.4%2C%20older%20versions%20of%20bitlbee%20require%20a%20bit%20more%20tweaking%2C%20consult%20the%20manual%29.%20%0D%0A%0D%0AFor%20Facebook%20Chat%20through%20XMPP%20to%20work%20you%20need%20to%20set%20a%20Facebook%20username.%0D%0A%0D%0AIn%20the%20%26bitlbee%20channel%0D%0A%0D&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee&amp;title=Facebook+Chat+in+bitlbee" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/facebook-chat-in-bitlbee" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/facebook-chat-in-bitlbee/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Yet another way to get Irssi notifications on your Linux desktop</title>
		<link>http://www.nowhere.dk/articles/irssi-notifications</link>
		<comments>http://www.nowhere.dk/articles/irssi-notifications#comments</comments>
		<pubDate>Sat, 06 Feb 2010 18:53:01 +0000</pubDate>
		<dc:creator>alj</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://www.nowhere.dk/?p=747</guid>
		<description><![CDATA[For a better solution, see this article &#8211; I am keeping this post online because it makes it possible to implement distributed notifications with Perl modules included in the Ubuntu repositories. One of the things lacking (in my opinion at least) when using Irssi and GNU Screen is the lack of a way for Irssi [...]]]></description>
			<content:encoded><![CDATA[<p>For a better solution, see <a href="http://www.nowhere.dk/articles/irssi-notifications-minivan">this article</a> &#8211; I am keeping this post online because it makes it possible to implement distributed notifications with Perl modules included in the Ubuntu repositories.</p>
<p>One of the things lacking (in my opinion at least) when using <a href="http://www.irssi.org/">Irssi</a> and <a href="http://www.gnu.org/software/screen/">GNU Screen</a> is the lack of a way for Irssi to alert you when you are not looking at the terminal.</p>
<p>I have looked at many implementations for libnotify (default in Ubuntu), <a href="http://www.mumbles-project.org/">Mumbles</a> (Growl for Linux) and <a href="http://sites.google.com/site/gotmor/dzen">Dzen</a>.</p>
<p>Some of the things I have looked at</p>
<ul>
<li><a href="http://thorstenl.blogspot.com/2007/01/thls-irssi-notification-script.html">thl&#8217;s irssi notification script</a> aka fnotify<br />Most of this is actually quite good and has formed the basis for my implemenation. Uses libnotify.</li>
<li><a href="http://jaredquinn.info/2007/09/using-irssi-with-libnotify-over-secure-shell/">Using irssi with libnotify over Secure Shell</a><br />A different implementation of the above, using xterm&#8217;s print facility to send data to libnotify.</li>
<li><a href="http://code.google.com/p/irssi-libnotify/">irssi-libnotify</a><br />Uses notify-send on the same machine as irssi, requires X-forwarding (which is a bitch with screen). I liked this but as it uses X-Windows on the remote server the notifications might not match those of your desktop</li>
<li><a href="http://sites.google.com/site/gotmor/dzen">Dzen notifications</a><br />This is where I got the idea for using a named pipe</li>
<li><a href="http://www.mumbles-project.org/">Mumbles</a><br />I used this before libnotify became standard in Ubuntu. It was hard to make it work and required several (Python) daemon running to forward the notifications.</li>
</ul>
<p>Since I have several machines I use to access my server where Irssi is running none of the other implementations I looked at really worked since I need to be sure that all machines get the notifications. In the end I decided to use MySQL as a &#8220;proxy&#8221; for the notifications.</p>
<p><strong>Prepare the MySQL database</strong></p>
<p>It&#8217;s a good idea to set up a separate database &#8211; just in case one of the scripts f*ck up and deletes everything.</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo mysqladmin -u root -p create irssi</div></div>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql&gt; use irssi<br />
Database changed<br />
mysql&gt; CREATE TABLE `notify` (<br />
&nbsp; `id` int(10) unsigned NOT NULL AUTO_INCREMENT,<br />
&nbsp; `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,<br />
&nbsp; `summary` varchar(64) CHARACTER SET utf8 NOT NULL,<br />
&nbsp; `message` varchar(255) CHARACTER SET utf8 NOT NULL,<br />
&nbsp; PRIMARY KEY (`id`)<br />
) ENGINE=MyISAM;<br />
mysql&gt; GRANT ALL ON irssi.* TO 'irssi'@'localhost' IDENTIFIED BY 'Password';</div></div>
<p><strong>Installing the Irssi script</strong></p>
<p>It is also possible to simply create a table inside an existing database; just adjust the configuration values in Irssi.</p>
<p>The Irssi script is based on <a href="http://jaredquinn.info/2007/09/using-irssi-with-libnotify-over-secure-shell/">Jared Quins work</a> (which in turn is based on <a href="http://code.google.com/p/irssi-libnotify/">irssi-libnotify</a>). The basic idea is the same as with fnotify but instead of writing to a temporary file I write to a MySQL database.</p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">## Put me in ~/.irssi/scripts, and then execute the following in irssi:</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<span style="color: #666666; font-style: italic;">## &nbsp; &nbsp; &nbsp; /load perl</span><br />
<span style="color: #666666; font-style: italic;">## &nbsp; &nbsp; &nbsp; /script load notify</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Irssi<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> vars <a href="http://perldoc.perl.org/functions/qw.html"><span style="color: #000066;">qw</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$VERSION</span> <span style="color: #0000ff;">%IRSSI</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> DBI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> utf8<span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$VERSION</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;0.01&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">%IRSSI</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; authors &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Allan Willems Joergensen'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; origauthors <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Luke Macken, Paul W. Frields, Jared Quinn'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; contact &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'allan@nowhere,dk'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; name &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'notifier.pl'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; description <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Use libnotify to alert the user of new messages or hilights (Using MySQL as &quot;proxy&quot;)'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; license &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'GNU General Public License'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; url &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'http://www.nowhere.dk/articles/irssi-notification'</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'notifier_mysql_user'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'irssi'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'notifier_mysql_password'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'changeme'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'notifier_mysql_host'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_add_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier'</span><span style="color: #339933;">,</span><span style="color: #ff0000;">'notifier_mysql_db'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'irssi'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> write2db <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_user</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier_mysql_user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_pass</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier_mysql_password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_host</span><span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier_mysql_host'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_name</span> <span style="color: #339933;">=</span> Irssi<span style="color: #339933;">::</span><span style="color: #006600;">settings_get_str</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'notifier_mysql_db'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dsn</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;dbi:mysql:dbname=$db_name;host=$db_host&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dbh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-&gt;</span><span style="color: #006600;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dsn</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$db_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$db_pass</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;DB connect failed&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;INSERT INTO notify (summary, message) VALUES (?, ?)&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Can't prepare statement: $?&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Couldn't execute INSERT: $?&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">disconnect</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$safemsg</span> <span style="color: #339933;">=</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">::</span><span style="color: #006600;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'&lt;&gt;&amp;&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$utf8msg</span> <span style="color: #339933;">=</span> utf8<span style="color: #339933;">::</span><span style="color: #006600;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$safemsg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; write2db<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$safemsg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> print_text_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dest</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$text</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$stripped</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$server</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>server<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$server</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>level<span style="color: #009900;">&#125;</span> <span style="color: #339933;">&amp;</span> MSGLEVEL_HILIGHT<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sender</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stripped</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sender</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\&lt;.([^\&gt;]+)\&gt;.+/\1/</span> <span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$stripped</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^\&lt;.[^\&gt;]+\&gt;.//</span> <span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$summary</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Hilite in &quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$dest</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>target<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$summary</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$stripped</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> message_private_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$msg</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$nick</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$address</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$server</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Private message from &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$nick</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> dcc_request_notify <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dcc</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$sendaddr</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$server</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>server<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #0000ff;">$dcc</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; notify<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DCC &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>type<span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot; request&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$dcc</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>nick<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'print text'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'print_text_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'message private'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'message_private_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Irssi<span style="color: #339933;">::</span><span style="color: #006600;">signal_add</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'dcc request'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'dcc_request_notify'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><a href="http://dl.dropbox.com/u/262048/www.nowhere.dk/files/notifier_pl.txt">Download the script</a> to ~/.irssi/scripts and rename it to notifier.pl.</p>
<p>If you want it to load automatically, symlink it to ~/.irssi/scripts/autorun<br /><em>$ ln -sf ~/.irssi/scripts/notifier.pl ~/.irssi/scripts/autorun/notifier.pl</em></p>
<p>Load the script inside irssi<br /><em>/script load notifier</em>.</p>
<p>Once you have loaded the script, set these variables inside Irssi (adjust according to your setup)</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/set notifier_mysql_db irssi<br />
/set notifier_mysql_host localhost<br />
/set notifier_mysql_user irssi<br />
/set notifier_mysql_password Password</div></div>
<p><strong>Setup MySQL port forwarding</strong></p>
<p>It is possible to use <a href="http://www.harding.motd.ca/autossh/">autossh</a> to automatically setup the tunnel but since I am always connected to my server (at least when I am in front of a computer) I chose to use normal ssh port forwarding.</p>
<p>In <em>~/.ssh/config</em> I have</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Host my.server.bogus<br />
&nbsp; &nbsp; &nbsp; &nbsp; LocalForward 13306 localhost:3306</div></div>
<p><strong>The stuff running on your local machine</strong></p>
<p>That is, the stuff that actually shows the notifications</p>
<p>I did not want to bother trying to make the MySQL-stuff error proof so I simply call the Perl script from a shell script like so</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #007800;">wait</span>=<span style="color: #000000;">0</span><br />
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; &nbsp; <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>irssi-notify-client.pl<br />
<br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">let</span> <span style="color: #007800;">wait</span>=<span style="color: #007800;">$wait</span>+<span style="color: #000000;">5</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$wait</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">30</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">30</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #007800;">$wait</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
<p>Save <a href="http://dl.dropbox.com/u/262048/www.nowhere.dk/files/start-irssi-notify-client_sh.txt">the script</a> as <em>~/bin/start-irssi-notify-client.sh</em></p>
<p>The Perl script requires DBI and Desktop::Notify &#8211; Both are available in Ubuntu</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo install libdesktop-notify-perl libdbd-mysql-perl</div></div>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:300px;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> DBI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Desktop<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$loops</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$notify_timeout</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2000</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$icon</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;gnome-irc.png&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> mysql_connect <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_user</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;irssi&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_pass</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Password&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_host</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;127.0.0.1:13306&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$db_name</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;irssi&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dsn</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;dbi:mysql:dbname=$db_name;host=$db_host&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dbh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-&gt;</span><span style="color: #006600;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dsn</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$db_user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$db_pass</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;DB connect failed&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dbh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dbh</span> <span style="color: #339933;">=</span> mysql_connect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$last</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth_state</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;SELECT MAX(id) FROM notify&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$sth_state</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Unable execute query: $dbh-&gt;err, $dbh-&gt;errstr<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$sth_state</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">fetchrow_array</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$sth_state</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">finish</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;SELECT id,time,summary,message FROM notify WHERE id &gt; ? ORDER BY id ASC LIMIT 0,10&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$last</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Unable execute query:$dbh-&gt;err, $dbh-&gt;errstr<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">rows</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$notify</span> <span style="color: #339933;">=</span> Desktop<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$notification</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$notify</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">create</span><span style="color: #009900;">&#40;</span>timeout <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$notify_timeout</span><span style="color: #339933;">,</span> app_icon <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$icon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ref</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">fetchrow_hashref</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$id</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ref</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'id'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$summary</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ref</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'summary'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ref</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'message'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">summary</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$summary</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">body</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$id</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/sleep.html"><span style="color: #000066;">sleep</span></a> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$notification</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">finish</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Clean up once in a while. This is not really essential so we simply </span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># do it once every 1000 iterations</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$loops</span><span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$loops</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth_cleanup</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;DELETE FROM notify WHERE id &lt; ?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$sth_cleanup</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$last</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$sth_cleanup</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">finish</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">disconnect</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/sleep.html"><span style="color: #000066;">sleep</span></a> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Save <a href="http://dl.dropbox.com/u/262048/www.nowhere.dk/files/irssi-notify-client_pl.txt">the script</a> to <em>~/bin/irssi-notify-client.pl</em>.</p>
<p>Remember to make both scripts executable.</p>
<p>The final thing to do is to add the notify client to your desktop environment&#8217;s autostart</p>
<p>In GNOME: System -> Preferences -> Startup Applications<br />
<div id="attachment_761" class="wp-caption alignleft" style="width: 341px"><a href="http://www.nowhere.dk/wp-content/uploads/2010/02/Screenshot-Add-Startup-Program.png"><img src="http://www.nowhere.dk/wp-content/uploads/2010/02/Screenshot-Add-Startup-Program.png" alt="Add Startup Program" title="Add Startup Program" width="331" height="154" class="size-full wp-image-761" /></a><p class="wp-caption-text">Add Startup Program</p></div></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.nowhere.dk/articles/irssi-notifications&amp;t=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop+-+http://aurls.info/dl&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.nowhere.dk/articles/irssi-notifications/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.nowhere.dk/articles/irssi-notifications&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop&amp;summary=For%20a%20better%20solution%2C%20see%20this%20article%20-%20I%20am%20keeping%20this%20post%20online%20because%20it%20makes%20it%20possible%20to%20implement%20distributed%20notifications%20with%20Perl%20modules%20included%20in%20the%20Ubuntu%20repositories.%0D%0A%0D%0AOne%20of%20the%20things%20lacking%20%28in%20my%20opinion%20at%20least%29%20when%20using%20Irssi%20and%20GNU%20Screen%20is%20the%20lack%20of%20a%20wa&amp;source=Allan Willems Joergensen - OnDemand" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.nowhere.dk/articles/irssi-notifications&amp;title=Yet+another+way+to+get+Irssi+notifications+on+your+Linux+desktop" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.nowhere.dk/articles/irssi-notifications" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.nowhere.dk/articles/irssi-notifications/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
