Google Talk Groupchat
Google talk has recently added a groupchat feature to their talk gadget. This allows multiple users to join a common channel, like IRC or a chatroom on AIM. This is a great feature, and I have personally used it a few times now for working on homework assignments with a small group.
However, it is currently only supported (AFAIK) on Google's Flash-based talk gadget. This is alright because of its compatibility with anything that can run flash, but a flash-based client can only do so much. I use Pidgin as my chat client. Formally known as Gaim, this open source program can connect to all major protocols, including the Jabber network, which is what gtalk is on.
So when I heard Google was supporting groupchats, I was eager to see if I would be able to connect to the server using pidgin, like I would be able to on any other Jabber server. Well, unfortunately, that isn't available (yet, I hope). It looked like I would be stuck using the flash client.
However, there is a way to connect to an existing groupchat, and even create a new room. Since Jabber is an open protocol, all messages are sent in plaintext, and are easy to understand. Using a tcpdump, a common packet sniffer, I was able to read a message I had sent to the room. On it was the name of the room, in the standard Jabber format: room@server/nick.
The name of the room was "private-chat" followed a string of hexadecimal characters, in the following format:
private-chat-00000000-0000-0000-0000-000000000000
The server was groupchat.google.com.
With this data, we now know enough to connect from another client, such as Pidgin, following these easy steps:
1) Connect to your google talk account from Pidgin, iChat, or your Jabber client of choice.
2) Choose "Join a Chat", or the equivalent option to join a chat room.
3) To join an existing chat, either enter the room ID in the "Room" field. More on finding this later.
4) Use groupchat.google.com as a server
5) Use whatever nickname desired
6) Click connect!
Now, assuming the room ID was in the correct format, a new chat window should pop up. How do we find out what ID to use? There are two options that I know of currently: join the room the normal way (through an invite on Google's talk gadget) and capture an incoming/outgoing message using tcpdump, ethereal, wireshark, etc. Somewhere in the message there will be a field which specifies the room. It has to be in the above format; it isn't very hard to find. If this seems to technical, the other option is for someone else in the room to do this themselves, and post the room ID. The ID is the same for everyone in the room, and it doesn't change.
An alternative option would be to simply create a new room. If I were to create a totally random ID, say
private-chat-12345678-dead-beef-feed-fedcba987654, as long as it follows the rules it will work. If there is no one in the room already it will simply be created. Now the room ID can be sent to other members connecting from Jabber clients, or by using the "Invite" option in Pidgin, users on Google's talk gadget can be invited into the room.
So although Google has disabled convenient groupchatting (e.g. being able to connect to myroom@groupchat.google.com) they have at least left a way (intentionally?) for other clients to connect and create rooms.
However, it is currently only supported (AFAIK) on Google's Flash-based talk gadget. This is alright because of its compatibility with anything that can run flash, but a flash-based client can only do so much. I use Pidgin as my chat client. Formally known as Gaim, this open source program can connect to all major protocols, including the Jabber network, which is what gtalk is on.
So when I heard Google was supporting groupchats, I was eager to see if I would be able to connect to the server using pidgin, like I would be able to on any other Jabber server. Well, unfortunately, that isn't available (yet, I hope). It looked like I would be stuck using the flash client.
However, there is a way to connect to an existing groupchat, and even create a new room. Since Jabber is an open protocol, all messages are sent in plaintext, and are easy to understand. Using a tcpdump, a common packet sniffer, I was able to read a message I had sent to the room. On it was the name of the room, in the standard Jabber format: room@server/nick.
The name of the room was "private-chat" followed a string of hexadecimal characters, in the following format:
private-chat-00000000-0000-0000-0000-000000000000
The server was groupchat.google.com.
With this data, we now know enough to connect from another client, such as Pidgin, following these easy steps:
1) Connect to your google talk account from Pidgin, iChat, or your Jabber client of choice.
2) Choose "Join a Chat", or the equivalent option to join a chat room.
3) To join an existing chat, either enter the room ID in the "Room" field. More on finding this later.
4) Use groupchat.google.com as a server
5) Use whatever nickname desired
6) Click connect!
Now, assuming the room ID was in the correct format, a new chat window should pop up. How do we find out what ID to use? There are two options that I know of currently: join the room the normal way (through an invite on Google's talk gadget) and capture an incoming/outgoing message using tcpdump, ethereal, wireshark, etc. Somewhere in the message there will be a field which specifies the room. It has to be in the above format; it isn't very hard to find. If this seems to technical, the other option is for someone else in the room to do this themselves, and post the room ID. The ID is the same for everyone in the room, and it doesn't change.
An alternative option would be to simply create a new room. If I were to create a totally random ID, say
private-chat-12345678-dead-beef-feed-fedcba987654, as long as it follows the rules it will work. If there is no one in the room already it will simply be created. Now the room ID can be sent to other members connecting from Jabber clients, or by using the "Invite" option in Pidgin, users on Google's talk gadget can be invited into the room.
So although Google has disabled convenient groupchatting (e.g. being able to connect to myroom@groupchat.google.com) they have at least left a way (intentionally?) for other clients to connect and create rooms.
Comments
The random string (in the format 00000000-0000-0000-0000-000000000000) is a UUID.
You can create one with uuidgen in Linux and OS X, UUIDGEN.EXE in Windows, or on the web at http://www.famkruithof.net/uuid/uuidgen.
[script type="text/javascript"]
var baseUrl = "http://talkgadget.google.com/talkgadget/";
var hostedDomain = "";
var room = "private-chat-6064e1fe-a901-4603-89d6-e634c61e492a@groupchat.google.com";
var user = "";
var windowInstance = "411670a648eeca97f5b9d703c91a6ede"
function launch() {
_joinPmuc(baseUrl, hostedDomain, room, user, windowInstance);
}
[/script]
var room houses the ROOM ID ;)
Enjoy!
"There was an error with Jabber."
1234@hello.com
I've check no firewall used, littlesnitch not active, using talk.google.com 5223
What could I be doing wrong?
mac 10.6.7
Thanks,
Rob.
Here's an AppleScript that does all the work for you. It assumes that your Google Talk account is named "Google Talk", but that's easy to change.
set uuid to do shell script "uuidgen"
tell application "iChat"
set s to the first service whose name is equal to "Google Talk"
set c to make new text chat with properties {id:uuid, service:s, name:"Group Chat", active:true}
end tell
do shell script "open \"xmpp:private-chat-" & uuid & "@groupchat.google.com?join\""
It assumes your account is named "Google Talk" but that's easy enough to change.