Myself and most others at the OSL use screen+irssi to keep our irssi sessions alive and move between locations and computers. The problem is that we don”t receive notifications of private messages or highlighted messages (messages directed to us in a channel, or keywords) on our remote machines. The solution I came up with was to send the notifications over XMPP to a jabber server which both the irssi client and notification system could connect to.
I was able to get growl-net.pl and mumbles to work using the growl protocol. It had two major flaws, we couldn’t automatically detect the IP for our laptop and it wouldn’t work behind a NAT. Greg Lund-Chaix and myself hacked on different schemes for tunneling IPs using ssh reverse tunneling, and nc to deal with the fact that growl is UDP only. We had some minor successes but the connections using nc would disconnect frequently.
The tunneling just wouldnt work and was too fragile so I changed plans and worked on using XMPP instead. Sending messages via XMPP would not require tunneling at all even if you are behind a NAT. To accomplish this I rewrote growl-net.pl into jabber-notify.pl and hacked up a quick python program that listens for jabber messages and forwards them on to libnotify (via pynotify), the standard notification library for ubuntu.
- Install Net:Jabber - sudo cpan -i Net:Jabber
- Download jabber-notify.pl
- Deploy it to .irssi/scripts on the server you run irssi on
- Load script /load jabber-notify.pl (You’ll get an error unless your jabber server is localhost)
- Configure settings using /set (option) (value)
- xmpp_notify_server - jabber server to send messages to
- xmpp_notify_user - jabber account to send message from
- xmpp_notify_pass - password for the sending user
- xmpp_notify_recv - jabber account which will receive the messages. This can be the same as the sender.
- xmpp_show_privmsg - notify about private messages
- xmpp_show_hilight - notify when your name is highlighted
- xmpp_show_notify - notify when someone on your away list joins or leaves
- reload script with new settings /load jabber-notify.pl
- Test using /xn-test
- Download jumbles.py
- Edit jumbles.py to set your values
- JABBER_HOST - Hostname/IP for the jabber server
- JABBER_PORT - Port for the jabber server. Default is 5222, 5223 for ssl/tls
- JABBER_USER - User to receive messages
- JABBER_PASS - Password for user
- start jumbles.py
- Jumbles is only going to receive limited support by me for the near future. While i’d like to add things like a tray icon, settings menu, and better reconnection logic, i just don’t have time right now. If you’re interested in any of these things feel free to contribute.
- Jumbles was hacked together fairly quickly from xmppy example code. Its name is a reference to this and mumbles which i was trying to emulate.
- The Sound used for notification is from open office, and can be channged on line 27
- If you dislike sound you can comment out line 75