A geek’s unified instant messaging setup

Today I want to present to you my unified instant messaging setup, which enables me to communicate from any of my computers and also any of my mobile devices (Android, iPhone, iPad). Goal for me was to provide a setup where I have single client per platform with a centralized history I can search if I need to. I want one – and only one – client for my communication. I only care about text instant messages, actually; I hardly ever use voice or video services when communicating online. I really like the asynchronous nature of instant messages. At the moment, I have integrated IRC, ICQ, Google-Talk/Jabber/XMPP (which could potentially also include Facebook), and Skype. The current setup also gives me push notifications to my iOS devices on messages directed at me. Today’s posting is only intended to give you a very high level overview. I will add detailed descriptions of individual setups of the individual components in later posts.

The Unified Instant Messaging Schema

Core of my setup is IRC. All my instant communication is mapped via IRC. Pretty old, but really well-working technology. Main reason here is that many of my friends and colleagues also communicate via IRC. I use irssi, which is a console client that can run within a screen session so it continues to run even when I am not in front of a terminal. The screen_away plugin takes care of setting the away status when screen is detached.

To connect my non-IRC services, I use BitlBee, which is an IRC proxy to connect to non-IRC protocols. BitlBee supports all my external protocols (ICQ & XMPP, that is). It also supports Skype via the fabulous bitlbee-skype plugin by Miklos Vajna. It requires a running Skype instance within a VNC server, though, but this is fine for me.

irssi is considered core of the setup, as it also provides the the irssi_proxy module, which enables other IRC clients to connect to this irssi instance, and when writing via this connection this is treated as if it has been entered directly into the irssi terminal. This mode is essential for my “centralized history / log file” requirement.

As connecting to the irssi_proxy module will only provide you with messages sent to you after you have connected, another layer is added: ZNC. I launch this IRC bouncer at the same machine as my irssi screen session. It connects to the irssi_proxy module and provides me with history if one of my external IRC clients connects, i.e. I am sent the history since the last time I connected to the ZNC.

My mobile devices connect to the ZNC bouncer via SSL whenever I decide to launch one of the clients. Due to my settings, I only get new messages. ZNC can be configured to send you the last n messages though, regardless where you last picked off, if you prefer that. But for me, it is primarily the “new” stuff that matters in communication (but this is of course personal taste).

On my iOS devices (iPhone, iPad) I use the Colloquy Mobile client. This is a clone of the GPL-ed Colloquy IRC client for OSX. In the App Store, it costs a few bucks, but I payed happily as this helps them in the development. There is a very nice plugin for ZNC, colloquypush, that enables push messages to Colloquy via Colloquy’s and Apple’s push servers. I have added a few patches to this open-source module, dealing with privacy (you can configure it to skip content of the messages when pushing) for sensitive communication channels (e.g. my work channel). Also I added an option that push messages are only sent while in away mode. This is where screen_away gets handy, as I only receive push messages when I am not attached to the screen session (or deliberately set myself to “away” mode in irssi). You can get colloquypush from the “official” maintainer’s github repository or mine (my “wip” branch is a few commits behind, as I am working on the Android improvements at the moment, see below).

On Android I use AndChat, which is a free (as in beer) client, but not open-source. Unfortunately there is no push functionality available at the moment, but I am working on an extension of the ZNC colloquypush module to work with a notification app I am currently developing (no estimated time of arrival, if ever).

For me, the setup provides the following benefits:

  • Centralized approach with a single client which is “always on”.
  • Single location for all logfiles, so I can search them using standard Linux tools.
  • irssi is ncurses and I love ncurses interfaces. I get nostalgic about the old terminals.
  • I can easily connect from any computer via SSH and attach to the screen session.
  • I can catch up while on the go via my mobile devices.
  • I receive notifications if anyone of my friends demands my attention (at least on iOS).
  • Native clients on the mobile devices, they simply feel smoother than connecting to an SSH session from your slow GPRS connection.
The following points I am currently not so satisfied with, but hope to improve in the future (in decreasing order of annoyance to me):
  • No notifications on my Android mobile phone.
  • ZNC sends me everything since I last connected, even if I have already seen it from within irssi. I suppose writing a plugin to ZNC to clear the buffer when switching into “away” mode could fix this and should not be too hard.
  • No way to search the history from the mobile devices. Centralized history is only available to me when I am connected to the screen session via SSH.
  • No real “status message” support from within Bitlbee. This is not really important to me, as I stopped reading status messages quite some time ago.
  • Skype must be running within a VNC window. Not sure if this will ever be fixable. Let’s hope Microsoft won’t discontinue Skype support for Linux.
  • SMS has not yet been integrated into this communication schema. But I have some ideas here (but they will take even longer than the Android notification issue).

5 thoughts on “A geek’s unified instant messaging setup”

  1. “ZNC sends me everything since I last connected, even if I have already seen it from within irssi. I suppose writing a plugin to ZNC to clear the buffer when switching into “away” mode could fix this and should not be too hard.”

    Just wondering if you ever created this plugin; I have literally scoured Google in search of one to no avail (really, no one else has been bothered by this?)

  2. At the moment I’m still working at the “No notifications on my Android mobile phone.” point (I’m already really far, actually). I can inform you once I have fixed the second point. 🙂

  3. I have a similar setup as yourself. I have WeeChat running behind Tmux. WeeChat is connected to ZNC, which in turn is connected to the many IRC servers I frequent, as well as Bitlbee. Bitlbee is connected to Google Talk and XMPP.

    With WeeChat, there is a 0mq Ruby script you can install that publishes YAML to the socket, when you receive private messages or channel highlights while away . I wrote a Python script, which I installed into /usr/local/bin/ and start with /etc/rc.local, that subscribes to the socket, parses the YAML, and sends an SMS alert for those 0qm events. The major advantage of this, is it does not require a running data connection, and does not require a running IRC client in the background. Thus, you can keep your data off, unless needed, and save your battery. The disadvantage is that it requires WeeChat. However, there is a ZNC plugin for doing SMS pushes as well.

    The SMS push is sent to an email-to-sms gateway that your cellular provider gives you. Of course, using SMS can be expensive, if you don’t have unlimited text. But, more and more, providers are providing cheaper unlmited SMS plans, so it’s becoming less of an issue.


  4. I’ve been looking around for other people crazy enough to try this setup, since this is exactly what I was about to. I already have the irssi-proxy setup and find it fits my needs perfectly. The only reason I want to add ZNC is for getting the old buffer, which seems so trivial for adding a whole extra layer. Did you find out any other ways of getting this straight out of irssi proxy so that we can skip the ZNC layer?

    The irssi proxy plugins just haven’t worked for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.