ANNOUNCE: Empathy 0.23.1

I released Empathy 0.23.1, the first release of the unstable 0.23.x branch proposed for inclusion in GNOME desktop 2.24. This release comes with tons of changes.

  • Drop libtelepathy and use telepathy-glib instead.
  • Beginning of support for MSN-like chats that becomes chatroom when a contact is invited.
  • Added user manual support, it’s being written by Milo Casagrande.
  • And the most important…… empathy now make easy to use TUBES !!!

What does “Tubes” means?

A tube is a way for applications to communicate. Traditionnally when I want to play a game with a friend I ask him the IP and the PORT on which he is hosting the server and I connect to it… And in most cases that fails because we are both behind a NAT.  Tubes is a way for a server to offer a socket to an IM contact, the remote contact accepts the socket and they can begin to write/read data on it. I works even if there is a NAT in both sides.

You can see screencast of ther sender and the receiver of a tube (other screencasts here). The code of that little game can be found on a darcs repository.

Empathy make easy for developpers to make that, what you have to do:

  1. When the user want to initiate a game (or share a doc in abiword, etc…) the application uses empathy’s contact list widget from libempathy-gtk to let the user select a contact
  2. The application creates unix, ipv4 or ipv6 socket on localhost and call (from libempathy) empathy_tp_tube_new_stream_tube (selected_contact, TP_SOCKET_ADDRESS_TYPE_IPV4, “127.0.0.1”, PORT, “MyGreatGame”);
  3. That’s all for the initiator side, the remote contact will see his empathy status icon blink.
  4. On the receiver side the application must register the DBus service “org.gnome.Empathy.StreamTubeHandler.MyGreatGame” by installing a .service file. When started the application must create a EmpathyTubeHandler object: empathy_tube_handler_new (TP_TUBE_TYPE_STREAM, “MyGreatGame”); and connect to the “new-tube” signal on that object.
  5. Each time someone offers a tube that “new-tube” signal is emitted and give a EmpathyTpTube object.
  6. When you get that tube object you can call empathy_tp_tube_accept_stream_tube (tube, TP_SOCKET_ADDRESS_TYPE_IPV4) and get the socket using empathy_tp_tube_get_socket (tube, &hostname, &port).
  7. Open that socket and both sides can communicate over it.

Now is time for Abiword, Inkscape, gnome-games, and all other network application to stop reimplementing an IM system! Please use libempathy and libempathy-gtk to make your live easier.

Important notes:

– MissionControl 4.65 now stores passwords in gnome-keyring, if you upgrade it don’t forget to retype the password of all accounts you configured with the old MissionControl to make sure the password get removed from gconf and added to gnome-keyring.

– Empathy 0.23.1 do not use MissionControl’s system to dispatch channels, that means that you have to make sure that you don’t keep .chandler and .service files from previous installations. If you are using packaged version of empathy it shouldn’t be a problem for you.

12 Responses to “ANNOUNCE: Empathy 0.23.1”

  1. Olivier says:

    Bravo. Merci pour tout le travail réalisé. J’espère vraiment que telepathy sera intégré dans gnome… des nouvelles de l’intégration dans gnome 2.24 ? Le problème de « maturité » soulevé pour la version 2.22 sera-t-il dépassé ?

  2. Sounds pretty cool. Is there a recommended way to use tubes from command line programs?

  3. John Stowers says:

    Two quick questions

    1). Can I do this from python
    2). Do I really need to install the service file, or can it be done programatically.

  4. xclaesse says:

    @James: All functions are in libempathy which do not depends on GTK+. So it’s possible to build a command-line program that make use of tubes.

    @John: 1) There is python bindings for libempathy and libempathy-gtk, yes. 2) We you receive an invitation the program is started via DBus activation so, yes, you need a .service, unless your program is already running.

  5. Xavier, a little question about mission-control.

    It seems that gnome-keyring support is not available on <a href=”http://mission-control.svn.sourceforge.net/viewvc/mission-control/trunk/configure.ac?view=log”svn trunk (aka 5.0betaX) but only on 4.65 release: could you please lobby MC developers in order to have it in trunk too? Could be really good for people testing GNOME and Empathy with jhbuild. Thanks.

  6. xclaesse says:

    @luca: MC 5.0 is not yet usable, it breaks completely empathy when I tried it. Users should stick to 4.x. Of course I’ll port my keyring patch to trunk once I get time for that.

  7. Alban says:

    @luca: you can use MC 4.x in jhbuild. I use this:

    Or the stable branch:

  8. Alban says:

    Hm XML in my previous comment has been removed.
    http://pastebin.be/10694

  9. @Xavier: cool. On the subject of command line apps, it would be nice to support an interaction model where I can run a command line app that makes use of a previously offered tube.

    From your description, it sounds like this could be done with a short-lived dbus service that empathy activates which sticks around long enough to pass the tube on to the command line app. But is it possible to do without such a service?

  10. xclaesse says:

    @James: Why do you want to have it without dbus service? The whole system uses dbus so you don’t really have the choice…

  11. What I really want is for the process on the receiving end of the tube to be initiated from the command line. A process started by dbus activation won’t know which terminal to run in, what current directory to use, where to redirect its stdin/stdout, or be able to take additional command line arguments.

    As stated in the previous mail, I think I can probably do all this with a short lived dbus service that gets activated by empathy. But it seems like a round about way to get the command line process hooked up to the tube so I was wondering if there is a more direct route possible.

  12. 0e992e7f3f0e says:

    0e992e7f3f0e

    0e992e7f3f0e22e76dcd