20 September 2006 ~ 23 Comments

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 19 October 2006 at 11:20 pm Permalink

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

  2. John 20 October 2006 at 8:36 am Permalink

    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. Mark 25 December 2006 at 7:02 am Permalink

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

  4. David 1 February 2007 at 3:44 pm Permalink

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

  5. chi 29 March 2007 at 6:53 pm Permalink

    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?

  6. german 4 April 2007 at 5:08 am Permalink

    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..

  7. André Felipe 5 August 2007 at 1:39 pm Permalink

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

  8. Juha-Matti 14 December 2007 at 4:28 am Permalink

    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 =:])

  9. Steve 13 May 2008 at 3:18 pm Permalink

    @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

  10. Bipin 17 May 2008 at 9:23 pm Permalink

    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

  11. RzR 31 May 2008 at 4:52 am Permalink

    > 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

  12. Simon de Hartog 31 May 2008 at 5:22 pm Permalink

    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.

  13. Steve 10 June 2008 at 2:34 pm Permalink

    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

  14. BoD 19 June 2008 at 2:41 am Permalink

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

    :(

  15. BoD 19 June 2008 at 5:25 am Permalink

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

  16. Chrelad 19 June 2008 at 3:16 pm Permalink

    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 :)

  17. Chrelad 19 June 2008 at 3:19 pm Permalink

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

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

  18. John 20 June 2008 at 6:44 am Permalink

    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. :)

  19. Kristoffer 24 September 2008 at 9:33 am Permalink

    Thanks!!!!
    Worked fine!!

  20. incith 17 April 2009 at 7:00 pm Permalink

    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