GoogleTalk

How Setup Google Talk in Emacs with JabberEl

Basic installation

jabbber.el is packaged in MarmaladeRepo so you can just:

M-x package-install jabber

Configuring

Customize the variable ‘jabber-account-list’ to have:

JIDyour gtalk username
Network Servertalk.google.com
Port5223
Connection typeLegacy SSL

Starting

Just do:

M-x jabbber-connect-all

and you will be connected.

Manual installation

The jabber.el package comes with installation notes but it can be more tricky to configure.

jabber.el 0.7.1 and below

Setting up emacs to use Google Talk is pretty easy since it uses the XMPP protocol, which is handled by jabber clients. JabberEl works well (at least from the arch sources available), and setup the following variables, either through customization or in your .emacs file:

  (setq jabber-username "username")
  (setq jabber-password "password")
  (setq jabber-nickname "nick")
  (setq jabber-connection-type (quote ssl))
  (setq jabber-network-server "talk.google.com")
  (setq jabber-server "gmail.com")

For example:

(setq jabber-username "my-username" ;; notice: leave off the @gmail.com
      jabber-server "gmail.com"     ;; this is a part of your user ID, not a part of the server you will connect to.
      jabber-network-server "talk.google.com"  ;; this is the actual server to connect to
      jabber-port 5223
      jabber-connection-type 'ssl)

After that, you might find this function handy:

  (defun jabber ()
    (interactive)
    (jabber-connect)
    (switch-to-buffer "*-jabber-*"))

Allowing you to M-x jabber to load up the client.

Problems with SSL on Gentoo

Under gentoo, I had to install the gnutls package to get everything working just fine, your mileage may vary.

Problems with SSL on OSX

I can verify that the above worked (on MacOS X). However, I had some difficulties at first. The version of gnutls installed by Mac ports would always throw an error when I tried to connect: (I could see this by switching to the buffer *-jabber-process-*)

*** Fatal error: A TLS packet with unexpected length was received.
*** Server has terminated the connection abnormally.

I installed a more recent version of gnutls (2.8.3), and modified both my PATH environment variable and my exec-path setting via Emacs-customize in order to ensure that that most recent version of gnutls was used, and not the version installed by Mac ports.

Once I did that, jabber connected to Google talk swimmingly.

timcharper

jabber.el 0.7.90 and later

If you use both Emacs and Gnus from CVS, you can probably get away with just hitting C-x C-j C-c and entering your Gmail address, but most of us mortals will need a setup like the following:

  (setq jabber-account-list
    '(("username@gmail.com" 
       (:network-server . "talk.google.com")
       (:connection-type . ssl))))

And make sure that you have either gnutls-cli or openssl installed and in your path. Then C-x C-j C-c should Just Work™.

Multi-user Chat

Here is a function to create use google groupchat:

  (defun egh:jabber-google-groupchat-create ()
      (interactive)
      (let ((group (apply 'format "private-chat-%x%x%x%x%x%x%x%x-%x%x%x%x-%x%x%x%x-%x%x%x%x-%x%x%x%x%x%x%x%x%x%x%x%x@groupchat.google.com"
                          (mapcar (lambda (x) (random x)) (make-list 32 15))))
            (account (jabber-read-account)))
        (jabber-groupchat-join account group (jabber-muc-read-my-nickname account group) t)))

For versions 0.8.x of JabberEl there may be an issue when connecting with Multi-user chat. You may have to set the variable ‘jabber-muc-disable-disco-check’ to t for disable disco checking if the above function doesn’t work(or popup the buffer). For more information read the jabber.el v.0.8.0 groupchat manual third paragraph.

Success Stories

Works great for me after installing gnutls package on Mac OS X using homebrew

$ brew install gnutls

-Alex

Very useful package, best way to integrate Google Talk as we did @ egga (Switzerland - French version)

- Gerard


JabberEl CategoryChatClient