HOWTO: Connect to Google Talk with Bitlbee

Bitlbee is an IRC gateway application that allows you to use an IRC client to chat with people on any of the major IM networks. Basically, you run Bitlbee as a daemon, and then connect to it as if it were a standard IRC server (6667/tcp). From there, you have Bitlbee log in to the various networks, and each of the people on your contact lists shows up in the #bitlbee channel.

It’s a really cool idea. It’s particularly useful if you predominantly use IRC for chatting, but you have a few friends who only use, for example, AIM.

From the earliest versions of Bitlbee it has been easy to connect to AIM, MSN, and ICQ. Now that Google has launched their own IM service (based on the Jabber protocol), many people would like to connect to that network as well.

So here’s how to use Bitlbee to connect to Google Talk (aka GTalk)…


The BitlBee User Guide has the basic syntax to use:

Syntax:
account add jabber handle password servertag

So for example, you would send the following command to your control channel:

<@jpm> account add jabber username@gmail.com mypasswd
talk.google.com:5223:ssl
<@root> Account successfully added

After root responds with “Account successfully added,” you can check your accounts with ‘account list’.

<@jpm> account list
<@root> 0. OSCAR, myname on login.oscar.aol.com (connected)
<@root> 1. JABBER, username@gmail.com (connected)
<@root> End of account list

After you have added the account, type ‘account 1 on’ and it should log in:

<@jpm> account on 1
<@root> JABBER - Logging in: Connecting
<@root> JABBER - Logging in: Connected
<@root> JABBER - Logging in: Requesting Authentication Method
<@root> JABBER - Logging in: Authenticating
<@root> JABBER - Logged in

If you are unable to connect, try switching the port to 5223. For some unknown reason, some people must connect on 5222 and others must connect on 5223. There appears to be no way to know which one to use other than trial and error. The easiest way to change the port number (IMHO) is to simply delete the account you created (’account del 1′) and add it again.

For what it’s worth, I ended up using 5222 and it worked fine.

Update: Don’t forget to save your configuration when you are done!

23 Responses to “HOWTO: Connect to Google Talk with Bitlbee”

  1. anton Says:

    Thanks for this howto. How about the phone feature of google talk?

  2. John Says:

    Anton:

    I’m not sure I know what you mean. Bitlbee and IRC are text based, so there would be no way to do audio through them. What exactly are you looking for?

  3. import this. » Blog Archive » Email notification via Jabber Says:

    [...] See also: HOWTO: Connect to Google Talk with Bitlbee [...]

  4. Mark Says:

    Thanks!
    Now I have all IM’s in irssi online!!

  5. David Says:

    Hey, thanks a bunch!
    It worked for me on port 5223.

  6. chi Says:

    i cant seem to rename my google talk and actualy its not even showing up in my bitlbee channel even though it does show me as connected. any ideas why?

  7. german Says:

    people with german gmail have to use:
    account add jabber username@googlemail.com mypasswd talk.google.com:5223:ssl

    otherwise they geht an error on activating:
    account on 1
    JABBER – Logging in: Connecting
    JABBER – Logging in: Connected
    JABBER – Logging in: Requesting Authentication Method
    JABBER – Logging in: Authenticating
    JABBER – Login error: Error 403: Unknown error
    JABBER – Signing off..

  8. André Felipe Says:

    I did not know that Bitlbee supports Google Talk too. I have just added my account. Thank you.

  9. Turn ChatZilla into an Universal Instant Messaging Client « Le Blog de Maurice Says:

    [...] <http://thinkhole.org/wp/2006/09/20/howto-connect-to-google-talk-with-bitlbee/> [...]

  10. Juha-Matti Says:

    Thanks for the instructions! They worked perfectly for me, except for having to change ‘gmail’ to ‘googlemail’ just as german said. So, I guess german’s comments applies to Finnish Gmail users in addition to the German ones (Vielen Dank =:])

  11. Steve Says:

    @root> Trying to get all accounts connected…
    16:15 jabber – Logging in: Connecting
    16:16 jabber – Logging in: Connected to server, logging in
    16:16 jabber – Couldn’t log in: Short write() to server
    16:16 jabber – Logging in: Signing off..

    idk it used to work now i cant login

  12. Bipin Says:

    Hey your howto is awesome…thank you so much…being new to irc and with a dream to build a thin machine…i switched to biltbee to ignore those bulky apps….great thanks man once again

  13. RzR Says:

    > 16:16 jabber – Couldn’t log in: Short write() to server

    same for me are you on debian ?

    account set may help ….


    http://rzr.online.fr/q/jabber

  14. Simon de Hartog Says:

    I’ve been using Bitlbee for quite some time with much success. However, I’ve never been able to use my GoogleTalk account with it yet. Version 1.0.3 simply segfaulted when connecting to Google Talk. Just installed v1.2 and followed numerous howto’s (including this one) but I just keep getting:
    00:20 jabber – Logging in: Connecting
    00:20 jabber – Logging in: Connected to server, logging in
    00:20 jabber – Logging in: Converting stream to TLS
    00:20 jabber – Logging in: Connected to server, logging in
    00:20 jabber – Couldn’t log in: Short write() to server
    00:20 jabber – Logging in: Signing off..
    00:20 jabber – Logging in: Reconnecting in 300 seconds..

    Any help is greatly appreciated. Thanks in advance.

  15. Bitlbee | The Diary Says:

    [...] an error with the unhelpful “Connection Closed” message. A bit of searching came across a post that had some helpful wisdom on it: account add jabber username@gmail.com mypasswd [...]

  16. Steve Says:

    I think jabber changed somthing, I am, on gentoo and archlinux, it’s ther same, “jabber – Couldn’t log in: Short write() to server” error on both..

    as for my setup thats easy :
    account add jabber email@gmail.com ********** talk.google.com:5223:ssl

  17. BoD Says:

    Same here, google talk doesn’t want to connect with this error:
    Couldn’t log in: Short write() to server

    :(

  18. BoD Says:

    Ok. After re emerging (I’m on gentoo) bitlbee, with the “gnutls” useflag, it works fine!

  19. Chrelad Says:

    Same problem… Gentoo box:

    auto_connect =`true’
    auto_reconnect = `true’
    password is empty
    username = `XXXXXXX@gmail.com’
    port = `5223′
    priority = `0′
    resource = `Home’
    resource_select = `priority’
    server = `talk.google.com’
    ssl = `true’
    tls = `try’
    xmlconsole = `false’

    Results in:

    jabber – Logging in: Connecting
    jabber – Logging in: Connected to server, logging in
    jabber – Couldn’t log in: Short write() to server
    jabber – Logging in: Signing off..

    I’ve tried both port numbers, with and without TLS and I’m not even sure what the xmlconsole does, but I tried that too… No change…

    Version: 1.2
    USE flags: jabber oscar ssl yahoo msn xinetd

    Thanks for any help :)

  20. Chrelad Says:

    The fix for the aforementioned problem (for Gentoo at least) is located here:

    http://bugs.bitlbee.org/bitlbee/ticket/379#comment:4

  21. John Says:

    Yeah, I think you need gnutls compiled in on Gentoo. For reference, here’s how I currently have it built…

    [ebuild R ] net-im/bitlbee-1.2 USE=”gnutls jabber msn oscar ssl yahoo -debug -ipv6 -nss -test -xinetd” 0 kB

    Works for me. :)

  22. Kristoffer Says:

    Thanks!!!!
    Worked fine!!

  23. incith Says:

    Here’s how to do it in newer releases of BitlBee:

    account add you@gmail.com password
    account list
    — look for: ###. jabber, you@gmail.com

    Where ### will be 0 or 1 or 2 depending on the # of the account you just added. Then do the following:

    account set #/server talk.google.com
    account set #/port 5223
    account set #/ssl true

    account on #

    Should connect fine.

Leave a Reply