hackergotchi

treitter

Let's Push Things Forward

Maximizing social utility for fun and (modest) profit


hackergotchi
treitter

Folks 0.1.17 includes a migration tool

The latest release of Folks, 0.1.17, includes a new folks-import tool to import meta-contacts data from Pidgin. So if Pidgin knows frank.reynolds@example.com and the_penguin@example.org are the same person, folks-import will catch Empathy up-to-speed.

Now would be a good time to double-check your "Excuses for not switching to Empathy" list.

Thanks to Philip for writing the tool.

We've also got a nearly-working Pidgin backend to let Empathy support this functionality native in its Import wizard, but it was too late in the Gnome 2.32 release cycle to squeeze it in.

And farther into the future, Folks should perform reasonably aggressive auto-linking, which should make even semi-automated linking like this unnecessary.

--

If you've got AIM accounts, you may bump into bgo#629311. See the workaround.

hackergotchi
treitter

Empathy hacking setup

Edit: Good News, Everyone! Sjoerd pointed out that the D-Bus fiddling in this post is unnecessary (as I'd hoped, but hadn't been able to manage). I mistook bgo#628738 for misconfiguration on my system.

So, this "guide" can be shortened to:

  1. create a new user (empathy-dev)

  2. install jhbuild

  3. jhbuild build empathy

  4. echo "export PATH=/opt/gnome/sbin:/opt/gnome/bin:$PATH" >> /home/empathy-dev/.bashrc

  5. echo "export XDG_DATA_DIRS=/opt/gnome/share:/usr/share:$XDG_DATA_DIRS" >> /home/empathy-dev/.bashrc

  6. slogin -X empathy-dev@localhost

  7. empathy

In order to do development on Empathy, I've created another user on my system (creatively named "empathy-dev") and run my development versions of programs, libraries, and services through this user. This has a couple major benefits:

  • zero downtime - I frequently restart Empathy during development. Running the default system version of Empathy as my regular user means I can stay online as I develop.
  • fault isolation - if I horribly break my development environment (eg, the bleeding-edge libraries I depend upon introduce major bugs), it doesn't affect my system stability

It was somewhat non-trivial to create a good setup, so I thought other people might find this handy.

Throughout this short guide, I use references to /opt/gnome, which is the standard jhbuild $PREFIX. So substitute your development $PREFIX as necessary. I make a point to not use the standard Unix development $PREFIX (/usr/local) so that my regular user doesn't run the development programs or libraries (for stability and sanity; see below).


Skip the remaining steps this guide - it's needlessly complicated


First, we need to set up a few bits and pieces so your shell and D-Bus know where to find the development programs and config. I use a fairly standard D-Bus local session config file.

The important (and only non-standard, I think) part is:

/opt/gnome/share/dbus-1/services

This allows the programs installed in our $PREFIX to launch necessary services (eg, Mission Control, the Telepathy Connection Managers) through D-Bus activation.

Download this file, adjust it as necessary, and put it in /home/empathy-dev/.dbus-1

Add this to the end of your development user's .bashrc:

export PATH=/opt/gnome/sbin:/opt/gnome/bin:$PATH

# let programs find any new icons, default config files, etc.
export XDG_DATA_DIRS=/opt/gnome/share:/usr/share:$XDG_DATA_DIRS

# automatically start a D-Bus session bus
alias dbus-setup="dbus-launch --config-file=$HOME/.dbus-1/session-local.conf"
session_setup=$(dbus-setup)
if [ $? -eq 0 ]; then
echo "\nSet up D-Bus session for $USER:";
echo $session_setup
eval export $session_setup
else
echo "\nFAILED setting up D-Bus session for $USER";
fi

Once you've got that set up, it's easy to launch the development version of Empathy as a different user:

slogin -X empathy-dev@localhost

Then, just run empathy and marvel at its independence from your main user's instance. However, if you haven't installed a newer version of empathy in $PREFIX/bin, this will just fall back to your system-installed version.

Fix this by setting up jhbuild and running "jhbuild build empathy". Find something to do for about 20 minutes. When you come back, if our dependencies haven't failed to build, you'll be able to run the latest version of Empathy as empathy-dev, without getting in the way of your system user.

Happy hacking!

--
dbus-launch will keep the dbus-daemon (and anything it activates) running by default after your development user logs out. There's a --exit-with-session option, but for some reason, if I use it here, about 30% of my keystrokes at the shell don't arrive. I'm flabbergasted, but it seemed completely tied to this dbus-launch option (I tried several times each way).

hackergotchi
treitter

Meta-contacts in Empathy (and beyond!)

We've finally closed Gnome Bug #460647 (Empathy: Support metacontacts)!

Let's get right to the pictures:

metacontacts-linking-dialog

This is our "Link Contacts" dialog. Selecting a number of contacts on the left side designates which contacts will be included in the Individual (read: meta-contact) at right.

We currently auto-link contacts with the same service ID (foo@example.org) contained in multiple accounts. In the future, we're going to push as much into auto-linking as possible. My goal is that most users would never need to use this dialog. Until then, this dialog is how you designate meta-contacts in Empathy.

metacontacts-edit-dialog

If you accidentally link together contacts you didn't mean to, you can simply open the Individual's info dialog and hit Unlink to start over.

metacontacts-persona-menus

One of the first benefits of meta-contacts is pulling together multiple modes of contact for a person into a single place. So if you've got a friend with separate work and personal IM, you can be an upstanding citizen and only send funny cat pictures to their personal IM address. (If they sign on to both at work, at least you tried your best).

We've kept the 1-click Chat/Audio Call/Send File/etc. actions for the (I think, more-common) case that you just want to communicate and you don't care about the specifics. This just uses any valid (ie, online) account for that Individual.

Thanks

This meta-contacts functionality is all possible thanks to the Folks project. It's a collection of libraries (so far, all distributed together) that collect contact information through various backends (Telepathy so far; many more to come) and aggregate Individuals (ie, People). Empathy was our starting point, but we really plan to integrate very well into the Gnome desktop and beyond. Think: typing -Alice- to start a chat with Alice through the Gnome Shell.

I'll discuss Folks in greater detail in future posts.

I'd like to thank my colleagues Philip "code factory" Withnall for helping with Folks development/Empathy integration and Empathy maintainer Guillaume Desmottes for letting us know exactly what we broke in each commit. And, of course, a special thanks to our employer, Collabora, for sponsoring us to work on this full-time.

Try it now!

Since you're no doubt very excited about these new features in Empathy, you can use them Right Now™ in version 2.31.91 (also coming to Debian experimental shortly). Be sure to file any and all bugs you run into, so this will be as solid a stable release as any other!

If software bugs have you leaping onto the nearest elevated furniture, no problem -- Empathy will, of course, by included in Gnome 2.32, coming to a friendly Linux distribution near you!

hackergotchi
treitter

Empathy accounts work for MeeGo (and free desktops everywhere)

I'd like to congratulate the MeeGo team on shipping MeeGo 1.0 for Netbooks! It's nice to see user-experience-driven design on Linux (where it tends to be conspicuously absent), shipping in a complete product. It really shows, too -- the UI is extremely responsive and it makes the whole experience a joy.

Thanks to Intel hiring Collabora for some MeeGo work, I made a few contributions to the distro some months back. Some were evolution data server code clean-up, adding tests, etc. For the interesting, user-visible changes (that I didn't work on), see Michael Meeks's post about Evolution in MeeGo.

But the more visible contributions were to Empathy's account settings. Originally, Empathy's "first-run" account setup wizard and accounts settings dialog were in the same process as Empathy. This meant you had to launch Empathy before you could edit your accounts, which is a little awkward if you're another application. Telepathy accounts aren't Empathy-specific, so it makes sense that the dialog be independent (though it still lives in the Empathy source tree).

Empathy account wizard in MeeGo 1.0

Thomas Wood's unified Control Center work appears MeeGo, and I adapted the Empathy accounts dialog to embed in it. The screenshot is fairly self-explanatory. When you access the accounts from the Control Center, you get a nice, full-screen version of the dialog:

Empathy account wizard in MeeGo 1.0, embedded in the control panel

Michael Meeks mentioned how small most netbook screens are. When you also factor in the MeeGo panel at the top of the screen, you can get situations where you need scrolling (but didn't on the full-sized desktop). So we added a scrollable view to the accounts dialog (to fit the full content of the Advanced section for protocols with a bevy of bells and whistles):

Empathy account wizard in MeeGo 1.0, embedded in the control panel

Since the actual dialog content is the same whether it's embedded or not, the same functionality works when it's stand-alone as well:

Empathy account wizard in MeeGo 1.0, advanced settings

And because the MeeGo team understands open source software, these features were developed out in the open and have been included in the last few releases of Empathy. So if you don't have them already, you will soon!

hackergotchi
treitter

Google frees VP8, announces WebM (with a little help from Collabora Multimedia)

This morning I was thrilled to hear that Google has opened up their high-performance video codec, VP8 and announced WebM, a container format with VP8 video and Vorbis audio. So now we've got a media format that's high-performance (not Flash), has low-power-requirements (not Flash) and is fully open and freely usable (not Flash, not H.264). The only missing piece is making sure it's widely supported (like Flash and, to a slightly lesser extent, H.264). So if this takes off, we can expect a much better experience for audio, video, animation on the web and on our phones.

There are a number of important players supporting this effort, including Collabora (GStreamer and our projects that use GStreamer, like Telepathy for multimedia calls), Google (YouTube, Android, Chrome, Chrome OS), Mozilla, Opera, Skype, Adobe (through Flash, surprisingly) in terms of software. And practically every major hardware player as well (AMD/ATI, ARM, Broadcom, Freescale, Logitech, nVidia, Qualcomm, TI, and more). This should make the problem of hardware support (which has traditionally been a problem for open media formats) a moot point.

Collabora Multimedia and Entropy Wave have added WebM/VP8 support to GStreamer, so support is already available for the open desktop.

Exciting times!

hackergotchi
treitter

LCA 2010 - Day 3

Day 1 | Day 2

Andrew Tridgell - FOSS and Patents

This informative talk went into a bit of detail on the current situation with (software) patents and some best practices for open source projects who want to avoid litigation. First, if you do get contacted by a company who claims your project violates one of their patents, contact public defenders, such as the Software Freedom Law Center or Electronic Frontier Foundation. In general, it's useful to know how to read patents, such as reading the abstract (but not stopping there, since they can often be misleading), then skipping ahead to the individual claims (which are the core of the patent), and then referring back to the diagrams, definitions, etc. as necessary.

And important point is that the "prior art" defense that so many people like to cite is actually very hard to win. This requires that the prior art covers every single claim in the patent. Instead, a "non-infringement" defense only requires that your work not (exactly) match every independent claim in the patent. There tend to be far more dependent claims than independent claims, so this defense tends to be easier to win.

An interesting point Andrew brought up was that he doesn't think it's to our advantage to avoid reading patents. His point is that even single damages (in the case that you unknowingly infringe a patent) is enough to end an open source project, so if you are forced to pay triple damages (in case you are aware of the patent), that doesn't change the end result. I unfortunately didn't have time to ask him this: wouldn't it matter to the author themselves whether they have to pay $LARGE_SUM_OF_MONEY or 3*$LARGE_SUM_OF_MONEY out of their own pocket? In either case, it's an ugly situation that you can be punished for being more knowledgeable.

Finally, Andrew suggested this strategy for open source projects to make themselves worse targets for patent suits (which is really all that matters): find and widely publicize work-arounds to patents. Closed-source companies are unlikely to do so, since a work-around could be a business advantage over another competitor who might otherwise be forced to license the patent. That way, we'll appear (and effectively be) a lot more work for patent owners to troll. That way, we can build up a reputation for not being worth the hassle. A great thing to aspire to.

20100123_007.jpg

Paul Mackerras -- Perf Events (in the kernel)

A replacement for perf counters, perf events provide kernel probes and simple API to perform fine-grained performance benchmarking on a Linux system. Whenever possible, perf events use hardware to get the most-precise data possible. There's a reasonable software-only fallback based on the high-resolution system clock (which most systems support at this point).

The API is essentially just one system call (which returns a file descriptor) and specific content behavior from that virtual file. Everything else is read(), close(), etc.

Events can be per task, per CPU, and, recently added, per-task-per-CPU. Per-task tracking can be recursive (forked processes get a copy of the parent counter struct and its final values are added to the parent upon exiting or explicitly synchronizing).

Perf events can trace cache (including TLB) activity, page faults, context switches, CPU migrations, and data alignment and instruction emulation traps.

Useful benchmarking always starts with good tools, and it sounds like we're finally getting a great tool with perf events!

Rusty Russell -- FOSS Fun with a Wiimote

Rusty detailed his geeky plans for making sure his daughter grows up to be a geek. These mainly involve writing some software to (ideally) translate her hand movements to actions on their TV. The idea was to help her establish causality at an early age, I think.

Anyway, I can't really do it justice in writing. You'll have to wait until the video is posted to see for yourself.

20100118_107.jpg

Carl Worth -- Making the GPU do its job

After giving a brief history of computer graphics an GPU development, Carl explained how hardware graphics support has sort of oscillated between discrete and integrated (into the CPU) hardware. (I wasn't aware that we'd already made the integrated → discrete → integrated cycle once before our current (in some contexts) migration back to integrated graphics).

The main problem with graphics in Linux right now is that we often have bad performance (which also means bad power consumption) and we need two drivers per video card (family, at least) -- one for 2D and one for 3D.

In order to figure out our bottlenecks, Carl created cairo-trace to measure the actual performance. This nifty program records the timing of cairo API calls for any program running under it. These traces can be played back through cairo at any time (at maximum speed), to continually improve performance for real-world uses of Cairo. I'm not sure if it's already in place, but these could easily be added to the (from what I hear, very good) automated cairo test suite, to avoid releasing regressions. If only more open source projects took testing and performance this seriously!

As it turns out, the current performance in most cases was actually better in pure software than in cairo-xlib (the latest stable backend for cairo).

An experimental GPU-accelerated backend (cairo-drm), in which Cairo bypasses X and uses GEM to render directly in the kernel, improves performance dramatically (10x speedup for Firefox). But the caveat is that it requires yet another driver per video card (bringing us to 3 total, for those of you keeping track at home).

Another approach, cairo-gl, which has Cairo bypass X to render to MESA, requires only 2 drivers total and should eventually have performance closer to that of cairo-drm. But for the moment, its performance is much worse than cairo-xlib.

Robert O'Callahan -- Open video on the web

Video on the web right now has two major players: Flash and Silverlight. (Maybe I just took ambiguous notes, but it's obvious that Silverlight is nowhere near Flash in terms of marketshare).

Beyond the obvious problem of software freedom, Flash is notoriously unstable (apparently a huge percentage of crashes of OS X are directly Flash's fault). Mozilla has decided that it's time to do something to push open media formats, to ensure this important (and growing) chunk of the Web retains the openness that has made the rest of it so popular and useful.

Some questions about the open formats:
  • Should we ignore patents?
  • This is only feasible while open formats are irrelevant, which isn't a great strategy.
  • Wait for the patents to expire?
  • They'll just be replaced with the next closed format.
  • Just pay the licensing fees?
  • Using a codec means you need to license it for your market size and per viewing (according to MPEGLA's fee structure), which is impossible for most websites serving content and for Mozilla to pay for distributing Firefox.

Another issue: video is not just about YouTube (passive watching). Flash adds interactivity (related videos, captioning, relevant ads, etc.), so we'll need an open counterpart to this as well.

Mozilla's solution for open video is Ogg Theora, which has had nice advances lately. GStreamer developer David Schleef got decent performance on OMAP3's DSP (in the N900 and other embedded devices) for Theora. The Ogg Index project adds indexing to the Ogg (container format?) to fix stream seeking over the web (which is frequently unusable without an index).

Mozilla has been shipping Theora support in Firefox 3.5+, since it doesn't want to pay, can't pay, and shouldn't pay for licensing codecs. If suddenly software patents were invalid, it'd be fine to just standardize on h.264, but that probably won't happen.

A big part of the chicken-and-egg push for open formats requires working with content providers and distribution networks. So Mozilla has gotten Dailymotion, the Internet Archive, and other websites to support Ogg Vorbis and Theora.

The other half is getting the browser to support the formats. Firefox 3.5+ can handle a Theora <video> tag; Chrome ships Theora (and H.264) support; Opera will ship Theora only. In FireFox 3.6, we'll get fullscreen Theora. Also in the pipeline is GPU-accelerated playback and Mobile/Maemo optimizations.

Partial successes in this push to open video include Vimeo and YouTube planning to support HTML 5's <video> tag on their sites (though they'll only be using the non-free H.264 codec).

So open media formats are slowly advancing on the web. We're basically at the point where most web standards are friendly to free software; if Gecko and (or) WebKit can't implement it, people don't propose it as a standard.

20100121_003.jpg

hackergotchi
treitter

LCA 2010 - Day 2

Day 1

Glyn Moody -- Keynote on OSS-like transparency outside of software

This talk covered a handful of ways in which open source software has inspired collaborative efforts in non-software fields, even reminding science of its origins in "open workbook" experimentation, where all the raw data is provided (as it should be). Jim Kent, a hacker working on his own, just barely beat Craig Venter's company, Celera, to sequence and publicly publish the human genome. Without this effort, Celera may have patented chunks of the genome (which obviously would have been a Bad Thing™). Kent did this thanks to a 100-machine Linux cluster, which was obviously a big win for both open source software and science.

Glyn then went on to point out that one of the biggest problems with the global financial system (and a large part of the crash) was due to its opacity. Even the industry experts don't really know much of the details, because all the data are locked up. Some governments are working to force this data to be more open -- Recovery.gov (in the US) is a good start, and the UK, Australia, and New Zealand are working on similar efforts.

20100118_019.jpg

Emmanuele Bassi -- A year of Clutter

Emmanuele delivered a few lightning talks in a row to cover what's gotten Clutter to 1.0, what has happened since its release, the plans for Clutter 1.2 (due in March), and the general plan for Clutter 2.x (begin before Clutter 1.x is end-of-lifed, and add any features that necessarily require API/ABI breaks; any changes that don't require breaks will also find their way into Clutter 1.x).

I'm not terribly familiar with Clutter, but it sounds like they've been making a nice amount of progress (which is especially important if it may become a dependency of GTK 3.x).

Dave Airlies -- Graphics drivers in the kernel; now what?

At the time X was first designed, graphics drivers in the kernel were infeasible, since they'd need to be re-written for all of the (many) different Unix kernels at the time. The environment is very different now, so it's worth the effort. Kernel-mode-setting (KMS) is the solution that Linux has adopted.

Tungsten tried doing something like KMS, but being developed top-and-bottom-inward, it ended up with an ugly API that didn't work very well. Keith Packerd wrote the Graphics Execution Manager (GEM), and KMS ended up being a combination of Tungsten's code with something more like GEM's API.

A couple immediate benefits of this new way of handling graphics is that we can now begin to handle video card power management and use the kernel debugger from within X.

Dave briefly discussed Wayland, the alternate display server. It seems to be desktop-environment-dependent and it isn't very complete (eg, keyboard input doesn't work yet), so it won't be replacing X.org (any time soon, if ever).

The Intel KMS driver is the most complete (except for GMA500), and just needs a little more work. AMD/ATi support is pretty good, though there's a stunning number of different video cards to support. Nouveau (the open nVidia driver) just moved entirely to KMS, and it's making decent progress.

20100118_142.jpg

Jan Schmidt -- Toward GStreamer 1.0

Jan gave us an overview of the progress GStreamer has made since its initial version (a lot), the current state (pretty good), and the future. There have been discussions of finally promoting the version number to 1.0; some of the downsides include a risk of development lull (as happened between 0.8 and 0.10) and the benefits include the ability to cut deprecated code and make it more clear to new developers that it's safe to use.

We also got a handful of nice demos (fully-functional DVD support, including menus and special "asides" subtitle support). But the crowd favorite seemed to be a demo app that tied playback rate to his laptop's orientation (from -$fast to +$fast). As Jan put it, "that's what accelerometers are for."

20100118_003.jpg

Adam Jackson -- The Rebirth of Xinerama

In a follow-up to his talk at last year's LCA about Shatter (an effort to better support aribtrary multi-screen setups), this talk updated us on the state of Xinerama to support similar configurations. Shatter eventually proved unworkable, but there has been some headway in other areas. At this point, X and the graphics drivers can support reasonably large-sum-dimensions displays, but the multiplexing of work across multiple GPUs needs to play catch-up (since more systems are starting to have multi-GPU configurations). The performance is linear with the number of GPUs -- unfortunately, it's 1/n, not n.

Adam discussed a number of potential solutions, as well as other issues which may be looming over the horizon (which is worthwhile, since most users weren't too concerned about supporting multiple GPUs in a single machine even recently).

hackergotchi
treitter

LCA 2010 - Day 1

This week, I'm in beautiful Wellington, New Zealand for LCA 2010. It's very well-organized conference (as always), and the weather has been even better than predicted!
20100118_150.jpg

Benjamin Mako-Hill -- Keynote on anti-features

Mako described his concept of anti-features (product features which intentionally reduce its functionality) and provided a number of amusing examples. I remember coming up with essentially the same idea several years ago (shortly before I switched full-time to Linux, coincidentally enough). It somewhat boggles the mind that there are so many engineers spending their time crippling their own work.

As Mako pointed out, most cell phones are surprisingly restrictive, but most of us just accept it. I gleefully raised my hand when he asked how many people had root access on their phone. Score another point for the N900 (which even avoids the G1 developer version's "freedom tax")!

Jonathan Corbet -- Kernel Report

Jonathan explained in great, yet digestible, detail what's happened in the Linux kernel in the last year. This shouldn't be too shocking to anyone who's familiar with his great reporting on Linux Weekly News. I'm fairly bad at keeping up with kernel news, so this was a great summary.

20100118_068.jpg

Chris Double -- Implementing HTML 5 Video in Firefox

A great update on the history and latest-and-greatest in video support in Firefox. They first built their own solution on some of the higher-level Xiph Ogg Vorbis and Theora libraries, but ran into a number of performance problems; then tried per-platform native implementations (including GStreamer on Linux), but the major platforms have no default codecs in common; next the tower caught on fire and then fell into the swamp; and most recently they've switched to an internal implementation that uses only the lowest-level Xiph libraries.

It was interesting to hear about some of the implementation limits. Apparently sound on Linux is still hard.

Chris's demos were fantastic - playback was very smooth, even when doing impressive green-screen, object insertion, and other fancy transformations. I can't wait to see websites take advantage of the video tag. Anything that minimizes our reliance upon Flash is exciting to me!

Denis Kenzior -- oFono: Open Source Telephony

oFono is a framework for handling mobline phone call/text/etc. features. It works on the idea of generalized modems for the various radio types (which, based on its goal of exposing only the interesting details to applications, I assume are hidden from the API) and has a daemon to do the work of sending and receiving audio calls and SMSes. The framework is meant to only support mobile phone functionality and intentionally ignores voice-over-IP (which Telepathy handles very well on the desktop and embedded systems by way of its telepathy-sofiasip connection manager).

There's an in-progress Telepathy connection manager which wraps oFono named yafono, written by my Collaboran colleague Andres Salomon.

Denis states that the current functionality is enough such that you could implement a 2G iPhone's cell stack with it.

Matthew Garrett -- Social Success for (and in) the Linux Community

Matthew discussed some of the social shortcomings of the Linux Community, who we consider members (mostly just developers, unfortunately). We were also graced with a number of relevant quotes and a touching story of his own transformation from occasional mailing list flame-thrower to sympathetic human being.

hackergotchi
treitter

Early Christmas!

My employer, Collabora was very generous and bought N900s for the entire company!

Mine just arrived:
N900: a Christmas present

I was lucky enough to pick one up at the Maemo Summit in October as well. However, those have to be sent back to Nokia in a few months, so now I won't have to dread the deadline :)

In related news, I'm (slowly) working on a handy Maemo 5 app of my own. More details as soon as it's usable (and uploaded to Maemo Extras [Devel]).

hackergotchi
treitter

Talking about the new Address Book at the Maemo Summit

Next week(end), I'll be co-presenting the Maemo 5 Address Book with Mathias Hasselmann

The entire Address Book team has put a lot of effort into this new release, and it really shows. It's very feature-ful, fast, and well integrated into the rest of the system. I think we're all proud of how it's turned out.

No shiny screenshots or screencasts here -- you'll have to come to the talk! :)

It'll be on Saturday, Oct. 10th at 18:00 in the "N900" room. Our talk will be followed up by drinks in the same room, so why not grab a seat early? ;)

You are viewing treitter