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 – but ended up using it anyway since it’s an easy way to display notifications in Windows (and probably in MacOS as well). There is a another Growl script for Irssi 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).
On Windows
- Download Grow for Windows and install it.
- Download MyEnTunnel and install it.
- If you haven’t already (which I am guessing you have) then download Putty SSH client and install it
- Configure MyEnTunnel to match your configuration, create a remote tunnel: <random port number>:localhost:23053 – The random port is important and will be used later
On the server running Irssi
- Install the Minivan – See this article
- Install Growl::GNTP
$ sudo apt-get install libcrypt-cbc-perl libdata-uuid-perl
$ sudo perl -MCPAN -e 'Growl::GNTP' - Install the script
#!/usr/bin/perl
# The IRC icon is from here: http://aurls.info/4o
use strict;
use warnings;
use IPC::Message::Minivan;
use Encode;
use Growl::GNTP;
use Data::Dumper;
if ($#ARGV != 0) {
print "Usage: irssi-notify-growl.pl <port number>\n";
exit;
}
my $port = $ARGV[0];
my $van = IPC::Message::Minivan->new(host => 'localhost');
$van->subscribe("#irssi");
my $growl = Growl::GNTP->new(
AppName => "Irssi",
PeerHost => "localhost",
PeerPort => $port,
Password => "",
AppIcon => "http://dl.dropbox.com/u/262048/www.nowhere.dk/files/irc.png"
);
$growl->register([
{ Name => "irssi", },
]);
$growl->notify(
Event => "irssi",
Title => "Minivan",
Message => "Connection established"
);
while (1) {
if (my $cmd = $van->get(5,[])) {
if ($cmd->[0] eq '#irssi') {
my $c=$cmd->[1];
my $message = $c->{msg};
my $summary = $c->{summary};
$growl->notify(
Event => "irssi",
Title => $summary,
Message => $message,
);
}
}
}Copy the script to ~/bin/irssi-notify-growl.pl.
- Make the script executable and run it as
irssi-notify-growl.pl <port number>
The port number is the one you chose on the Windows machine for your remote tunnel – You need to run an instance of the script for each Growl-client.





