August 20, 2012
Hot end of summer
Although the time table for Google Summer of Code says it is over, outside temperatures in my city are over 35°C and the summer is definitely not over yet. You can sweat in front of your computer and it is not because of a difficult bug.
In the beginning of the summer, I choosed python library SleekXMPP for implementing Collaborative GTG. When you try to do something complicated, you will hit a lack of documentation. Although it slowed me down, I have implemented sharing task, showing people in your contact lists and their avatars, assigning tasks to people. I focused on adding as less widgets as possible and changing the interface minimally.
Also I tinkered with a plugin for the telepathy-gabble as the way for implementation. If you write an application based on XMPP protocol, you can build a plugin and get access to accounts in Empathy. The user can enter her account credencials just once and reuse it for GTG. Plugins are written in C with the flavor of GObject and using Wocky library for handling XMLs. For the record, hello world code is few hunder lines long and Wocky sometimes lacks a method for PubSub. For those reasons, I focused on the implementation using SleekXMPP. I would like to finish the plugin in the near future. Special thanks to Guillaume Desmottes who showed me how to implent hello world plugin during GUADEC.
PubSub protocol was designed for a slightly different use case than Collaborative GTG. A standard configuration let you save just a small amount of the recent data. However, GTG needs to store all your data. I’ve spent some time on how to configure an XMPP server. Luckily, there is a configuration option for it in ejabberd server. Every time when GTG starts, it tries to update that configuration option.
During the weekend, I demoed Collaborative GTG to Lionel. Apparently, his fritalk.com XMPP server is configured differently or run slightly different version of the server. Some basic commands did not work on his server although they work on my local server.
As you can see, Collaborative GTG still has some rough edges. The summer is not over yet. I have a couple of spare weeks before the next year starts at my university. I would like to spent this time polishing and debugging.
If you like to break things, keep reading. I’ll show you how to setup Collaborative GTG on your computer.
Let’s play with it
This mini tutorial shows you how to setup Collaborative GTG on freshly installed Ubuntu 12.04. It should be easy to translate it for your distribution.
As XMPP server, I use ejabberd 2.1.10. You need mod_pubsub which is enabled in the standard configuration and set parameter max_items_node to a high number to store all your tasks on the server.
sudo apt-get install ejabberd
sudo sed -i 's/{mod_pubsub,.*/&\n\t\t{max_items_node, 9999},/' \
/etc/ejabberd/ejabberd.cfg
You can grab my the exact configuration from wiki.
You need to install dependencies for GTG and tools to obtain the latest code:
sudo apt-get install gtg bzr git python-pip
Get the latest code:
bzr branch lp:~izidor/gtg/collaborative-gtg
git clone https://github.com/liblarch/liblarch
sudo pip install sleekxmpp
cd collaborative-gtg
It is a time to add users on the server. Let’s have two users me@localhost and friend@localhost. We need to register them on the server:
sudo ejabberdctl register me localhost password
sudo ejabberdctl register friend localhost password
Afterwards, you need to add to the contact list of each other and maybe set avatars. You can accomplish that using a standard XMPP client like Empathy or Pidgin. If you have it, it is the play time! Run each command in a separate terminal. It runs multiple instances of GTG without messing up your GTG tasks:
./scripts/debug.sh -s me
./scripts/debug.sh -s friend
If you don’t remember my screencast, open Edit -> Synchronization services and add a new PubSub service. You will see the following dialog:

A dialog for a new PubSub service.
As the username put JID of the user, i.e. me@localhost or friend@localhost. The password is profound password password. The server is pubsub.localhost. Confirm your changes by clicking on the button Enable Synchronization.
To share a task with another account, create a task with a tag. Display the tag pane and in right-click menu select Edit. You can select the other account to share this tag. If you enable synchronization in the other account as well, you will see the task in the other account’s GTG.
It is much work to setup the environment from the scratch. When Collaborative GTG is merged into GTG’s trunk, dependencies will be solved by package manger and you would already have you XMPP account.
Happy breaking stuff!