To make this possible you need the irssi proxy to be configured(find out how here), the libnotify library and it’s python bindings, the python irclib library, python and optionally, if you’re behind a restrictive proxy like for example squid, an ssh client capable of port forwarding, more on this later on.
First, a screenshot of what this baby does:
Ok, now let’s go deep into installing a configuring this baby. Install instructions will be based on Kubuntu, my laptop’s distro, but they should work for any Debian based distro.Let’s install the needed dependencies:
apt-get install libnotify1 python-notify python-gtk2 python-setuptools \ python-irclib notification-daemon
Once the above is finished, you can use setuptools easy_install tool to install Irssi Notifier, so let’s install it:
The above command will install Irssi Notifier into python’s site-packages and the irssi-notifier binary into /usr/bin/.
Now, until you get your configuration settings right and Irssi Notifier does not throw you an error do, in case you’ve setup irssi proxy to listen on domain example.tld, port 55555 with the the proxy password Bar for the nick Foo:
irssi-notifier -P example.tld:55555:Foo -p BAR
If the above did not throw error(it shouldn’t) then you can write the configuration to file(defaults to ~/.irssinotification):
irssi-notifier -P example.tld:55555:Foo -p BAR -W
Now, next time you want to launch Irssi Notifier, you just have to issue:
Now, some explanation to what gets written to the configuration file plus some other available configuration options:
[main] passwd = BAR proxies = example.tld:55555:FOO timeout = 5 friends = foobar barfoo
- nick - The common nick used in all defined proxies
- passwd - The irssi proxy password
- proxies - A space seperated list of irssi proxies to listen to composed of <address>:<port> or <address>:<port>:<nick>. If you choose the first way to define the proxy you must also provide the nick configuration variable, that’s the way we know messages are addressed to you.
- timeout - Timeout in seconds for the pop-up notification to go away.
- friends - A space seperated list of your friends nicks to be notified when they join, part, quit or change nicks.
That’s about what’s needed to run Irssi Notifier.
Connect-Proxy is basically an OpenSSH extension to enable ssh connections through a proxy server. There’s info on how to use the connect-proxy on it’s own page, basicly, in my specific case, I need to connect to the http proxy and authentication is not required, so I changed my ~/.ssh/config and added:
ProxyCommand connect-proxy -H <proxy_host>:<proxy_port> %h %p
Now, for every ssh connection that command is executed, and that’s how I‘m able to ssh trough the http proxy. And for irssi notifier, basicly, I establish a tunnel for each irssi proxy connection defined, for example:
ssh -L 55555:localhost:55555 firstname.lastname@example.org
Back to your own usage, now you should instead point Irssi Notifier to localhost instead of the remote host.
irssi-notifier -P localhost:55555:Foo -p BAR
And that’s it, I hope you enjoy Irssi-Notification and feel free to comment on it.
Released a bugfix release, IrssiNotification 0.1.1:
- Fixed a bug regarding private messages notification. Whitin a private conversation, even our own messages were beeing notified to us.
Corrected blog post on the missing dependency and wrong package name, thanks Markus.