Bitlbee

I usually use pidgin for my instant messaging, but recently it has stopped alerting me when I get messages. I wasn’t entirely sure why, but it meant I kept missing messages from people and was incredibly annoying. A combination of this and the fact that I wished to be able to stick in Emacs for chatting sent me out on a search for a new messaging program.

Emacs itself has a few packages that claim to do instant messaging support, bust most are either in early stages, flat-out don’t work, or don’t support the protocols I need. TNT, for example, works quite well - but only for AIM. Since in most cases I use either MSN or Gmail, that strikes TNT out. Unfortunately, it seemed I was going to have to either switch to another external IM client or just keep using Pidgin. Then a friend of mine told me about Bitlbee.

Bitlbee is a program that will create an IRC server that you can use to communicate via MSN, Jabber, and a few other protocols. You can use it to MSN via a terminal running IRSSI; I decided to use ERC, Emacs’ built-in IRC client. The bitlbee we page is located here; go there if you need to report a bug, or want more information than is provided in this post.

Installing Bitlbee is easy, if you are on Ubuntu. A simple ’sudo apt-get install bitlbee’ will install it. I’m not entirely sure how to do it on other operating systems, but the source is provided so in the worst case scenario you can just build it yourself. Once this is done, the command ’sudo /etc/init.d/bitlbee start’ will start the IRC server. Connect to this on localhost:6667 and you are ready to go.

Once you join the IRC server, you will need to register your account. Do this by sending the message ‘register pass’, where pass is your desired password. After this, you can start adding accounts. Adding a MSN account is done by ‘account add msn username@userdomain pass’. Gmail accounts require two commands to add: The first is ‘account add jabber user@gmail.com pass’ and the second is ‘account set 1/server talk.google.com’ The 1 in the previous command may differ in your case: find which number you should be using by sending ‘account list’. Connecting to your accounts is done with ‘account on #’. Once you are logged in, you probably want to save your configuration with ’save’.

Once you have connected to your accounts, you can see all your buddies and their statuses with ‘blist’. Messaging them can be done in two ways, the first of which is to prefix the message to them with ‘username: ‘. In this case, replies they send to you will appear in this main channel. If you want a private message to be opened, you can message them using the standard ‘/msg user’ command. This is probably what most users will want; I haven’t used bitlbee with ERC enough to know which I prefer.

Of course, you will probably want to add new contacts eventually. This is done with the ‘add’ command. To use it, just ‘add # user’, where # is the number of the connection you want to add the user to and user is their username. The other command you’ll want to know aobut at the start is ‘rename’, which will allow you to alias users with ‘rename user alias’. Since many people have usernames that don’t make it obvious who they are, this command is pretty much required for a chat application.

That is everything I needed to do to get set up with Bitlbee and start chatting. To access its help system, use ‘help’ in the bitlbee server. There are a few other things I want to investigate that aren’t a huge priority for me: the ability to merge users and to export my aliases are two of them. It doesn’t look like there is a way to export data from bitlbee, although there is a bug report filed. The ability to merge users is probably not possible in bitlbee itself, but it’s not a big deal and I can probably just code something in elisp to handle that case.

Tags:

2 Responses to “Bitlbee”

  1. Brian says:

    I went through the same thing. I liked bitlbee, but kept looking for another solution. While I’m back to Pidgin now (Adium on Macs), I used to used elim, an instant messenger for emacs that uses libpurple. It’s not completely polished, but more than usable and I really liked it when I did. Definitely worth trying out: http://www.emacswiki.org/emacs/ELIM

  2. Seth says:

    Another option for chatting with users is ‘/query user’. That’ll launch the chat in a new buffer.

Leave a Reply