Looking around Wayland

My new adventure at Collabora involves Wayland, like all the cool kids. I was distraught to learn that, since Wayland only provides clients with pointer position information to the surface currently under the pointer, and only relative to that surface, xeyes no longer works. We’ll see about that…

A bunch of eyes following the mouse in Weston

Watch a phone-cam video of the eyes in action1 in your choice of WebM or freedom-hating H.264! (I apologise for the shakes, but it yielded smoother results than the GNOME Shell screencast thing.)

The pointer’s position is provided to clients which request it, relative to a surface of their choosing. Thanks to the way surface transformations work in Weston, the eyes still work when rotated without any further effort:

A bunch of ROTATED eyes following the mouse in Weston

Ready for the desktop!

Joking aside, I don’t really expect my branch to be merged any time soon, not least because it’s very much a proof-of-concept and is pretty easy to break. But it was a useful exercise in learning my way around the Wayland and Weston code-bases. The work involved was actually pretty small in the end:

  • Implement a pair of eyes which only work when the cursor is over them;
  • Define a protocol extension allowing clients to ask to track the pointer position relative to a surface;
  • Plumb it into the compositor and client.

Now onto something a little more useful…

  1. with unintentional soundtrack by Marco, Jo and Daniel []

The end of Chromium Notes

Alas, Evan Martin’s excellent series of blog posts from the Chrome-on-Linux salt mines has come to an end. His sabbatical apparently didn’t relieve his general malaise, which he explains thusly:

Before we’d jokingly say “year of Linux on the desktop!” and laugh about how it would never happen, but my smiles had become bitter. A short way to put it is that writing high-quality software is not really a goal of the platform; stuff that doesn’t matter like continuously rewriting atop ever-changing platforms is. The scrappiness and free software spirit is what makes me love Linux as a hacker but I recognize now a deeper doom, that it will only ever broadly succeed by removing that spirit (e.g. Android).

I disagree that “writing high-quality software is not really a goal of the platform”, but there is an argument to be made that incrementally developing a high-quality platform (to enable writing high-quality software) makes life harder for third-party developers. It’s easy for free desktop developers—myself included—to underestimate the impact that tweaking the platform has on others, even if the changes make the platform more coherent in the long term. A common justification for churn is “the work is done by volunteers who wouldn’t necessarily spend their time on other things instead of this”, but that tends to ignore the other volunteers, caught up in dealing with unrelated changes, who would rather spend their time on other things.

This is not to say that platform-wide changes should be avoided at all cost: one of the great merits of the free software ecosystem is that it’s possible to make such changes. Nor am I claiming that volunteers cleaning up stagnant code bases is to be discouraged—quite the opposite. Nor is this an anti-GNOME 3 post, lest I be misinterpreted as thinking that Gtk+ 3, GObject Introspection and other leaps forward were a mistake. But taking advantage of this excellent new technology in applications does carry a cost in the short term.

My favourite Empathy feature no-one knows about

Picture the scene. You’re painstakingly composing a lengthy message…

…when you manage to close the tab by accident (maybe you hit Ctrl-W after too many years using a terminal? or maybe you thought your browser was focused?). You hammer your keyboard in frustration: your beautiful prose is gone forever. But wait! What’s this lurking in the Tabs menu?

Not only does it reopen the tab you just closed, but the message you were composing is remembered, too. Crisis averted!

The keyboard shortcut is Shift-Ctrl-T, just like in many web browsers (which inspired this feature). As a secret bonus feature, the keyboard shortcut works in the contact list, too, to rescue you when you’ve closed the very last tab by accident. Empathy remembers the last few tabs, not just the most recent.

Of course, if you don’t know the super-secret contact list shortcut, you can go find the contact in your contact list again: Empathy should still have remembered the message you were typing. (Right now it doesn’t persist across sessions; a patch to add that would be most welcome!)

Undo Close Tab has been around for a while; remembering the half-written message was added in Empathy 3.1.2, so it’s coming soon to a GNOME 3.2 near you! Thanks, Jonny.

A Tale of Two Conferences

I spent the week in humid, rainy Berlin for the Desktop Summit. I particularly enjoyed Sunday’s keynotes by Claire Rowland and Nick Richards, not to mention the many great talks and discussions. It’s always fun to catch up with old friends (not to mention my coworkers at Collabora, very few of whom I see regularly), and to meet some new (to me, at least) faces, including João Paulo, whose Summer of Code project—implementing OTR in Telepathy—I have the pleasure of mentoring. I gave a talk of my very own, which apparently is one of the few videos available so far. I haven’t dared watch it yet. ;) I hope to make the promised new release of Bustle this coming week.

Later in the week, the BoFs on D-Bus and on GNOME IM integration were both very productive. Hylke and Andreas’s input was very useful in the latter, as was the presence of David and George of KDE-Telepathy fame: they’re solving (and hitting) a lot of the same issues as are found in GNOME, so we had some true cross-desktop pooling of ideas and solutions. Thanks to everyone!

The passport queue at Stansted

The journey back on Friday evening was smooth—at least until we hit Stansted, where of course there was an inexplicable zoo of thousands of travellers queueing for passport control. (Not pictured: the thousands more behind me.) And of course, what better to do after a week at a conference than to attend another two-day hackathon at Homerton

Desktop Summit and CamHac Lanyards

CamHac is the first Haskell hackathon I’ve attended. It’s a very welcoming community, full of interesting people and projects. I swapped Vim tips, shoulder-surfed some of the internals of GHCi, chatted about open data and web server frameworks with some Silk folks, learnt about the internals of fast output stream libraries, and otherwise hacked on a long-dormant GObject introspection-based binding generator. It took a while for me to catch up with Daf’s work to date; I warmed up by generating code for enums and flags, and then started reworking the code generator to use haskell-src-exts’s AST and pretty-printer. Interesting stuff.

Shaving a yak with an angle bracket

Today I wrote an XMPP console for Telepathy, in the form of a little Gabble plugin plus a really terrible Gtk+ interface that lets you send an IQ and see the result, syntax-highlighted—mostly in bright pink—by GtkSourceView. Wocky, gobject-introspection and GtkGrid.attach_next_to are all great. In the highly unlikely event that XMPP consoles are something that interest you, and that the lack of one has been dissuading you from embracing Empathy, I hope this meets with your approval.

This has mostly been a diversion from debugging some weird alias, roster and presence interactions between Gabble and Prosody, which I still haven’t tracked down. But hey, the angle brackets look nicer now!

Sojourner help wanted for MeeGo Conference SF

A few months back, Topi Santakivi updated Sojourner for the MeeGo Summit in Tampere. Andrew Flegg wonders about an update for MeeGo Conference San Francisco 2011, which I’m sadly not attending. The schedule’s available as a web page. I had a quick poke around for a version in a more machine-readable format—ideally PentaBarf XML, which Sojourner understands, but even something that could be converted to that—and couldn’t see anything obvious.

Dear reader, would you happen to know of such a machine-readable schedule, and would you like to send a merge request updating Sojourner to show it?

Empathy chat room improvements

Folks who’ve tried using Empathy for IRC will have found the experience a bit lacking. While some of this is due to Empathy itself, many of the problems are due to Idle, the Telepathy backend for IRC, being sorely in need of love and caring. Happily, Debarshi Ray has taken it under his wing. Most visibly, he’s implemented the ContactInfo interface, which allows Telepathy UIs to show WHOIS information. I threw together a few patches for Empathy to take advantage of this information:

Contact information for ‘wjt’ on Freenode, showing other channels, away message, and other IRC-specific details
Please ignore the ‘missing image’ icon!

Sadly, the “Channels” field is not very useful on most major networks, like Freenode, since—by default—you can only see the rooms that both you and the contact are in. In the past, on IRC, that window was positively anaemic, showing only the first three lines. Now it’s full of information, and could do with some advice from designer types: how can we show all the information described in his blog post without the dialog becoming even more a massive grid of words?

Rishi’s also fixed up many less obvious annoyances in Idle, like making it sending pings to keep otherwise-idle (ahem) connections alive. It’s great to have him on board!

Stepping away from IRC, I’ve recently been using XMPP chat rooms more, and noticed a subtle improvement implemented by Chandni: Empathy now shows per-user typing notifications in the user list. Now I wish this were possible on IRC too, or that more channels would move to XMPP: it’s really useful information to have, particularly in smallish rooms.

Termite Misdirection

I really hate how submitting or updating a bug on Bugzilla leaves you at post_bug.cgi or process_bug.cgi, rather than bouncing you back to a URL that actually identifies the bug in question. So, I wrote a Greasemonkey userscript named Termite Misdirection to detect this situation and fix the URL. If your browser supports the HTML5 history API, it should be mostly transparent; if not, then you’ll see the page being reloaded, and you’ll lose the “Changes submitted” etc. message.

I use this Chromium; I’m told it works in Firefox too. (Yes, I know I should submit a patch to Bugzilla itself to make this unnecessary, but that would be more work than 16 lines of Javascript and wouldn’t work with all the existing Bugzilla instances I use every day.)

eMusic in Banshee

I’ve been an eMusic customer for many years, and I’m pretty happy with it. Banshee comes with a plugin—courtesy of Eitan—to help download entire albums from eMusic without using their own downloader application. But you have to go search in your browser, and then hope the necessary MIME type handlers are set up to pass the .emx file eMusic gives you to Banshee, and also have remembered to enable the plugin.

Having enjoyed the notorious Amazon store integration, I thought I’d try my hand at something similar for eMusic. Here’s a quick demo video of downloading a couple of albums: one free, one not. Not shown in the video: playing track previews inside Banshee, and downloading invididual tracks.

I’m pleased to say that I wrote approximately no code (which is good, because I don’t really speak C♯): it’s derived from the Amazon store plugin, with most of the code removed. What remains is in a branch on fd.o; I’ve updated bgo#623828 with a link if anyone fancies reviewing this. (I am very tempted to set up a personal cheese and wine fund.)

RXMPP: an R library for XMPP based on Wocky

My friend David Lawrence Miller likes the internet, and also likes statistics. (He has many other admirable qualities, but these are the two most pertinent to this bulletin.) He spends some of his days writing programs in R, which he then runs on one of a number of servers. He wanted his R programs to send him messages over Google Talk to report their progress.

Naturally, I suggested he use Wocky, everyone’s favourite GObject-flavoured XMPP library. (Do not confuse.) And lo! he’s started RXMPP, a simple R library for sending IMs. He’s developing on Mac OS X; it should work on Linux and Windows just as well, though.

(As an aside: I wonder if anyone would be interested in maintaining a Wocky framework for OS X? Currently one has to install glib via MacPorts, and then build Wocky from Git, to hack on RXMPP on OS X.)