Problems with Windows Live’s XMPP server

As you probably know (see here and there), it is possible to connect to MSN using the XMPP protocol with GNOME 3.4.

However, since last week, I think nobody can connect anymore. The reason is that MS server started using see-other-host, which is perfectly standard (part of XMPP CORE), but not implemented into telepathy-gabble. I can’t really blame them for this since they warned developers twice, and even then, it became effective much later than they announced.

The problem is described and patches are available in bug #51033, it should hit telepathy-gabble master soon. I’ll also consider backporting to stable branch, but patches are a bit intrusive…

There is a 2nd problem with WLM’s XMPP server that sometimes prevent us to connect. This time it is really a server issue out of our control. I’ve sent all needed logs and MS devs are actively working on the issue. However, retrying to connect multiple times (which we do by default) eventually succeed after some attempts.

Last but not least, it is possible to ADD (not REMOVE, wondering why their server does not accept that…) contacts in your MSN account. But WLM server uses a non-standard trick for that, to convert a Live account (e.g. to a jid (e.g. The non-standard iq are described here, and telepathy-gabble patches are available in bug #50341 to make it work.

I’m happy this is not useless work, since we have now over 10 000 monthly unique users connecting to MSN with XMPP through gnome-online-account (I’m app key owner, so I get usage stats).

Edit: telepathy-gabble 0.16.1 now released with a fix for the see-other-host issue.

Did you know g_clear_object/pointer() ?

g_clear_object() has been in glib since 2.28, and now g_clear_pointer() has landed in glib master (see bug #674634).
Their typical usage is to implement GObject::dispose, or “goto out” pattern, previously you would write:

void my_dispose (GObject *obj)
  MyObject *self = (MyObject *) obj;
  if (self->priv->object != NULL)
      g_object_unref (self->priv->object);
      self->priv->object = NULL;
  if (self->priv->hash != NULL)
      g_hash_table_unref (self->priv->hash);
      self->priv->my_hash = NULL;


void some_func ()
  GHashTable *tmp = NULL;

  if (error)
    goto out;

  tmp = g_hash_table_new();

  if (tmp != NULL)
    g_hash_table_unref (tmp);

But now those becomes:

void my_dispose (GObject *obj)
  MyObject *self = (MyObject *) obj;

  g_clear_object (&self->priv->object);
  g_clear_pointer (&self->priv->hash, g_hash_table_unref);


void some_func ()
  GHashTable *tmp = NULL;

  if (error)
    goto out;

  tmp = g_hash_table_new();

  g_clear_pointer (&tmp, g_hash_table_unref);

As extra bonus, g_clear_object() and g_clear_pointer() are thread-safe. That means that 2 threads can clear the same pointer at the same time and it will be freed only once. I’ve heard some code needs thread-safe dispose…

Thanks to Simon McVittie for the original idea in telepathy-glib where we had tp_clear_object/pointer for years.

GTestDBus – test your DBus app

Recently, I’ve been working on making GDBus’ unit test helpers as public API on libgio (see bug #672985). Thanks to the help from David Zeuthen, it landed in gio master as GTestDBus object.

The basic idea is simple: g_test_dbus_up() starts a dbus-daemon and sets DBUS_SESSION_BUS_ADDRESS env variable. That means that your tests will then be using that private session bus instead of messing with user’s. When the unit test is done, call g_test_dbus_down() which will kill the dbus-daemon. Of course in the case you unit test fails and crash, it still make sure the dbus-daemon will be cleaned.

And finally, thanks to Alexander Larsson, it even works on win32.

Enjoy :D

git fork – quickly publish your git branches

When working with a new git project, I like to publish my patches in git branches on my public git server. I usually use the collabora git server, but some people also have account on freedesktop, etc. But it’s a bit long just to publish a branch:

  1. locally: git clone ssh://
  2. locally: ssh
  3. collabora: cd public_html/git && git init --bare git://
  4. locally: git remote add xclaesse git+ssh://

Note how GNOME urls are different in 1) and 3), not only the ssh:// VS git:// but also the extra /git/ and it’s different with freedesktop.

So my first step to simplify this is to define insteadOf URLs in ~/.gitconfig both locally and on server:


[url "ssh://"]
    insteadof = gnome:
[url "git+ssh://"]
    insteadof = collabora:

on server:

[url "git://"]
    insteadof = gnome:

Now the steps are:

  1. locally: git clone gnome:empathy
  2. locally: ssh
  3. collabora: cd public_html/git && git init --bare gnome:empathy
  4. locally: git remote add xclaesse collabora:empathy

Still I’m lazy so I don’t like sshing the server manually, so the final step is to add this git alias in your local ~/.gitconfig:

    fork = !git config --get remote.origin.url | xargs -n 1 ssh \"cd ~/public_html/git && git init --bare\"

That will create a public repository for the project you’re currently in, just by typing “git fork”! Steps are now:

  1. locally: git clone gnome:empathy
  2. locally: git fork
  3. locally: git remote add xclaesse collabora:empathy

Update: It’s more flexible with a python script, save it as “git-fork”, put it somewhere in your PATH and chmod +x


import subprocess

remote_host = ""
git_remote_prefix = "collabora:"
git_remote_name = "zdra"

# Get current git repository's name
remote = subprocess.check_output(["git", "config", "--get", "remote.origin.url"]).strip()
name = remote[max (remote.rfind("/"), remote.rfind(":")) + 1:]
if not name.endswith(".git"):
    name = name + ".git"

# Create a remote repository
remote_cmd = "cd ~/public_html/git && git init --bare " + name (["ssh", remote_host, remote_cmd])

# Add the remote repository to git remotes and push master (["git", "remote", "add", git_remote_name, git_remote_prefix + name]) (["git", "push", git_remote_name, "master"])

Updates on XMPP support in MSN

Good news for MSN users!

As explained in a previous post, Microsoft added XMPP support to connect MSN. A few days ago, they made it officially supported (previously was a developer preview only).

Thanks to the advice of a Microsoft developer, I even fixed the legal issue that prevented us to enable this by default. Client applications (as opposed to web applications) are not meant to ship the app secret key, even for closed source app (would be too easy to find the key in the binary). So there is a simple checkbox in the app settings to tell it is a “mobile application” and then it won’t need the secret key to authenticate.

All patches got merged and released into empathy (>=3.3.2), telepathy-gabble (>= 0.15.0), and gnome-online-accounts(>=3.3.0).

MSN in Empathy with XMPP

A month and a half ago, Microsoft announced that they had added XMPP to their Windows Live APIs. That means that any Jabber client could connect to MSN using our favorite open IM protocol! No more closed protocol to reverse-engineer.

Unfortunately, logging into their service is a bit more complex than just providing a login and password: they support only OAUTH2-like authentication. The good thing is that gnome-online-accounts already supports oauth2 for Facebook and Google services, and I’ve seen while googling that the mechanism is pretty much the same as Facebook. So I’ve downloaded Microsoft’s documentation (registration required to get it), created my own Windows Live application, copied GOA’s Facebook code to start with, and replaced the bits according to MS’ doc and got the login page!

Creating Windows Live account in GnomeOnlineAccounts

Unfortunately, from there it was failing to get the access-token, turns out the documentation contradicts itself. In one place they describe the exact same mechanism as existing code for Facebook, and the other places have small differences… I’ll let you guess which way actually worked ;-)

The Windows Live account created in GnomeOnlineAccounts

Then I had to write in empathy-auth-client (an app usually used to ask user the password) code to instead take the access-token from GOA’s DBus API and give it to telepathy-gabble (our XMPP backend). After fixing a few bugs in telepathy-glib, telepathy-gabble and wocky, EUREKA! Got my MSN account connected in Empathy! Unfortunately it seems the features exposed by their XMPP server are really limited, just like Facebook’s XMPP.

My MSN contacts in Empathy

At the same time, I’ve also added support in Empathy to connect to Facebook GOA accounts, and authenticate them using goa’s access-token instead of having to repeat the password.

Code source is available in bugzilla, waiting for review:

Still, we have an important issue:
This new auth mechanism require us to register a Facebook/Windows Live application. An application consists of a public ID and a secret key. Since gnome-online-accounts is open source code, it means the app’s secret key would be readable from its source code (atm it is given as configure flag), meaning that anyone could make its own malware claiming being the “GNOME” application. This could be considered by Facebook/Microsoft a violation of their service (if I understood correctly). For Google service, it is not a problem because they offer an “anonymous” application and it is user’s choice to accept to grant permission or not (again, if I understood correctly).

Thanks to Collabora for letting me working on this!

Unified contact notifications

I’ve been working on gnome-shell’s IM notifications recently. The idea is to unify all notifications about a contact into the same bubble.

If you’re chatting in gnome-shell’s embedded chat and then the contact calls you, the “answer” and “reject” buttons gets into your chat instead of popping a new notification.

Call Approver

Then while the call is connected, the notification stay persistent and have a nice phone icon with call duration timer

Ongoing Call

What’s great with that design, is that if someone is calling you, there is a chat available right away to answer “sorry I’m busy, calling you later” and the reject the call.

Patches are attached on bug #656028

Empathy chat theme – call for designers

Empathy chat view has been supporting Adium themes for a long time now. Those themes are made of HTML, CSS and JS and are rendered using webkit-gtk. Empathy also supports build-in themes using a plain GtkTextView.

I’ve been working recently on improving empathy’s code to support the most recent theme spec as well as fixing rendering issues we had with some themes. I also added a theme preview is settings dialog.

Adium Theme Preview

Designers have been working hard to create the GNOME 3 look & feel, and I think a GNOME adium theme would be great to have for empathy chats. That theme would be shipped by empathy and set by default, so we could drop our GtkTextView-based themes for a massive code simplification.

This is a call for designers: We would like mockups, ideas, and finally a working adium theme to be used by empathy by default.

In a first step, gimped image of what we would like would be enough. Then we can start implementing it with the HTML/CSS.

Suggestions and ideas can be posted on the empathy bug #645920, or on the usability mailing list.

One week with GNOME3

I’ve installed GNOME 3 ppa on my ubuntu natty last week, and have been using it exclusively since then. To be honest I’ve been ranting a lot against GNOME3 before using it for my day to day activities, so I feel I should share my observations now that I really know it. Here are all the good and bad things I’ve seen, with no particular order. I’ll try not being too polemic (that’s hard exercise for me), please keep in mind I’m not pretending being a normal user; I’m a developer so my needs probably are different.


I’ve reported most of the bugs/regressions/unusabilities I’ve observed in bugzilla during the week

648190 gnome-settin UNCO NumLock is not enabled by default
648153 gnome-shell UNCO typing on the desktop could start searching in overview
648138 gnome-shell UNCO Issue when swithing from/to dock station with external monitor
648137 gnome-settin UNCO wallpaper suddenly became white
648114 rhythmbox RESO NOTG Window does not always close when running gnome-shell
648106 gnome-shell UNCO My account just below IM presence in me-menu is confusing
648097 gnome-shell UNCO me-menu says I’m available, but I’m not until I start empathy
648096 gnome-shell UNCO inconvenient workspace handling when app needs restart
648094 gnome-shell RESO DUPL Impossible to change wallpaper from desktop
648093 gnome-shell RESO DUPL multimedia keys are not working from overview
648091 gnome-contro UNCO In shortcut tab, “+” and “-” buttons does nothing
648089 gnome-shell RESO DUPL can’t select “wikipedia” with keyboard
648088 nautilus RESO DUPL Impossible to move a file to trash with DELETE key
648087 gnome-tweak- UNCO gnome-shell does not show icons on desktop after login
648084 gnome-shell UNCO Network connected/disconnected notifications stay forever


I think I’ve changed the default value for pretty much everything in that tool. I find it sad to unify all gnome-settings in a new shiny and consistent UI, and then rely on a completely different and inconsistent tool for the rest. I know it is extremely hard to define what options to show the user, but IMO this feels like an easy solution to avoid the problem instead of facing it. Maybe we could simply make gnome-tweak-tool just another “tweak” icon in gnome-control-center, so at least it gets linked from there. That would feel more integrated.

GNOME thinks I’m disabled people

Considering all the effort to keep UI as minimum as possible, with no applets on the panel, no way to tweak it at all, and still I’m forced to have that menu for disabled people on my panel. I completely agree it is important for people needing those options to have a way to quickly access them, but this seems really really overkill to me. At least this could be yet-another option in gnome-tweak-tool?

Also please rename those “universal access”; do I really have access to the whole universe in one click? At least this sound silly in the French translation…


I’m probably the last geek to use nautilus to manage my files instead of gnome-terminal, but this change in nautilus to use ctr-del to delete a file surprised me. For the first days I’ve been thinking it was just a bug that nautilus can’t delete files and I used right-click context menu to move to trash. Then I discovered by asking on IRC this was actually intentional!! I won’t even start telling this is wrong, but simply ask one simple questions: How is CTR-DEL discoverable? Pressing DELETE does nothing, just silently ignoring me. My first intuition was of course the context menu to move to trash, and no shortcut is shown there. Since any computer user since in win95 (or even earlier?) are familiar with DELETE key to delete a file, I think it is important to have some notification telling the user what to do.


The menu on the right of my screen that kindly reminds me my name, next to the disabled-people-menu (not only GNOME thinks I’m blind, but also that I have Alzheimer), looks like an IM menu to me. It starts with my fullname (which I use as alias on my IM accounts) and a chat bubble icon like the new Empathy icon. Then it have Available/Busy items which are totally IM vocabulary, followed by “My account” which surprisingly does not open Empathy account settings… and this ends here, the rest has nothing to do with IM… I do totally like having IM being first-class citizen in GNOME UI, but something looks wrong here. Especially since when I boot the computer, the menu says I’m available, but all my empathy accounts are actually offline. Changing to busy, back to available, etc does not change my status in Empathy; unless I first start empathy’s contact list view. I know this is partly because Empathy/Telepathy are not yet ready to fully integrate IM into the core desktop.

My vision of Telepathy integration into the desktop, is that “Empathy” as an app does not really exist. We have views for different kind of IM informations (contact list, chats, file transfer, presence, account settings, etc). Those views are provided partly by empathy widgets, but also by gnome-shell itself (presence in me-menu, embedded chat). The views are apps started on-demand but are not THE im application. So empathy’s main window is (should) just a view of the contact list, it does not need to be running to be available on XMPP and receive IM messages.

I have great hopes for 3.2 :D

Embedded IM chats

This is totally awesome! I love it so much! My only concern is the empathy status icon still blinking even after I replied messages in the embedded chat. During the week I’ve almost never actually opened the empathy’s chat window, I’ve been always chatting in gnome-shell directly. If gnome-shell’s activities search could match my contacts names too and let start chat/call, I think I could even not need to see empathy’s UI at all.

non disturbing notifications

Thanks god for smartly hiding notifications, I’m spending much less time in liferea since I don’t see anymore when my RSS are refreshed. I also totally like the rhythmbox’s notification when changing song, that let you pause/skip easily without needing to open the rb window (I’m using multimedia keys most of the time though).

It could be improved a bit though, for example when a new IM message arrive when I was away, I don’t see any notification until I open that bottom panel.

The wow-effect

I think gnome-shell is a perfect balancing between modern OpenGL desktop, but still looking professional. When compiz started showing tones of technically impressive 3D effects, I’ve always though its nice, but not professional. Now gnome-shell succeed in take advantage of technology, but not over-using it.


I though it would be worse, but still I’m missing my launchers for some apps. I’m used to open a lots of gnome-terminal everywhere, for example. I had launchers in my gnome-panel before. I’m getting used to keyboard shortcuts now, but still I miss them a bit. I wish the launcher bar in the activities view could be visible on my desktop, and smartly hide when a window is on the border, like the ubuntu unity.

multi desktop

This is also something I though it would be worse. But still I can’t get totally used to it. It should have a way to spin some desktops to they don’t get removed when empty. Since they are dynamically open/close, I sometimes get lost in my desktops, having the preview image when using ctr-alt-up/down could help I think.

Also I miss a direct way to switch desktop using the mouse. May I suggest having the desktop bar we see in activities visible on desktop too. Just like suggested for the launchers above, it would hide like it does for unity’s launcher bar.

The shutdown story

You’ll be surprised, but I personally don’t miss the shutdown option. I almost always suspend anyway. After important upgrades, ubuntu should add a reboot option there; is such distro extension possible? A tooltip or something could suggest ALT magic key to reboot/shutdown, though.


Wikipedia makes perfect sense for an Open project, but is GNOME paid (like Mozilla AFAIK) for that Google advertisement at least? Even Internet Explorer lets the choice.

Developer feeling

This is probably partly because I have less time to contribute to GNOME this year, but I feel its getting more difficult for developers not having full-time job working on GNOME to contribute. I see 2 main reasons for this:

  1. Gtk3 breakage: In previous cycles it was almost trivial to build Empathy master on latest stable Ubuntu release. Only a few telepathy packages were needed from a ppa. With this GNOME3 cycle, it was mostly impossible to even see what was being worked on. We had the choice between installing totally unstable distro (not even Ubuntu sadly) with a full GNOME3 desktop, or build the world with jhbuild, which I always considered (wrongly?) a pain to get stuff working.
  2. Decisions are more and more made by UX “experts” who knows better, and make their plan partly behind closed doors. I have to admit they did mostly an amazing work, but as user and occasional contributor, I feel I’ve lost my voice. I don’t think anymore I can change stuff that I don’t like in GNOME, not because of technical reasons, but because GNOME is now part of a bigger plan. This is probably a good thing for marketing, but makes the hacker in me sad.

Hopefully point 1 won’t be the case anymore for GNOME 3.1 cycle, and point 2 is maybe more a feeling than a reality and could surely be improved.

Importance of fallback mode

No, not everyone has OpenGL running just fine on linux yet, and no not only proprietary drivers are broken. Just 2 examples on my laptop with intel GPU:

  1. gnome-shell won’t startup in a VM using virt-manager
  2. Playing an OpenGL game with wine works just fine when I launch it from gnome2 desktop with metacity and not effect, but is terribly broken rendering when launch from gnome-shell.

My conclusion

GNOME3 is a good base for upcoming releases. Better than I’ve though before using it everyday, but still lots of place for improvement and not yet the perfect release I hoped. I only hope designers and main hackers will be flexible enough to let it involve to something that can make everyone happy, but still rigorous to keep a consistency. Hard task, really.