Ph: 123123123

24 hours a day, 7 days a week, 365 days per year...

February 16, 2012

unexpected concurrency

OK kids, quiz time. Spot the bugs in this Python class:

import os

class FD:
    _all_fds = set()

    def __init__(self, fd):
        self.fd = fd
        self._all_fds.add(fd)

    def close(self):
        if (self.fd):
            os.close(self.fd)
            self._all_fds.remove(self.fd)
            self.fd = None

    @classmethod
    def for_each_fd(self, proc):
        for fd in self._all_fds:
            proc(fd)

    def __del__(self):
        self.close()

The intention is pretty clear: you have a limited resource (file descriptors, in this case). You would like to make sure they get closed, no matter what happens in your program, so you wrap them in objects known to the garbage collector, and attach finalizers that close the descriptors. You have a for_each_fd procedure that should at least allow you to close all file descriptors, for example when your program is about to exec another program.

So, bugs?

* * *

Let's start with one: FD._all_fds can't sensibly be accessed from multiple threads at the same time. The file descriptors in the set are logically owned by particular pieces of code, and those pieces of code could be closing them while you're trying to for_each_fd on them.

Well, OK. Let's restrict the problem, then. Let's say there's only one thread. Next bug?

* * *

Another bug is that signals cause arbitrary code to run, at arbitrary points in your program. For example, if in the close method, you get a SIGINT after the os.close but before removing the file descriptor from the set, causing an exception to be thrown, you will be left with a closed descriptor in the set. If you swap the operations, you leak an fd. Neither situation is good.

The root cause of the problem here is that asynchronous signals introduce concurrency. Signal handlers are run in another logical thread of execution in your program -- even if they happen to share the same stack (as they do in CPython).

OK, let's mask out signals then. (This is starting to get ugly). What next?

* * *

What happens if, during for_each_fd, one of the FD objects becomes unreachable?

The Python language does not guarantee anything about when finalizers (__del__ methods) get called. (Indeed, it doesn't guarantee that they get called at all.) The CPython implementation will immediately finalize objects whose refcount equals zero. Running a finalizer on the method will mutate FD._all_fds, while it is being traversed, in this case.

The implications of this particular bug are either that CPython will throw an exception when it sees that the set was modified while iterating over it, or that the finalizer happens to close the fd being processed. Neither one of these cases are very nice, either.

This is the bug I wanted to get to with this article. Like asynchronous signals, finalizers introduce concurrency: even in languages with primitive threading models like Python.

Incidentally, this behavior of running finalizers from the main thread was an early bug in common Java implementations, 15 years ago. All JVM implementors have since fixed this, in the same way: running finalizers within a dedicated thread. This avoids the opportunity for deadlock, or for seeing inconsistent state. Guile will probably do this in 2.2.

For a more thorough discussion of this problem, Hans Boehm has published a number of papers on this topic. The 2002 Destructors, Finalizers, and Synchronization paper is a good one.

GNOME Development Network: An attempt to improve the GNOME developer experience

I thought it'll be nice to blog about this before the Documentation Hackfest was started.

I am quite frustrated with the current situation with regards the API reference browsing experience in the GObject world, some of the problems are these:

I can't quickly get a compact overview of all the properties, methods and signals of a given class On top of that, I need to open each super-class or interface page separately to know which properties are inherited from those I can't figure out all functions/methods use a given class as an argument or return type, or which classes use it as a property. People can't add comments or code samples to each struct/class/method/... People can't easily suggest amendments to the documentation without diving into the code and generating a patch + a bug in bugzilla.

On top of that, usability wise I'm not too happy with the current web frontend and/or devhelp. The information to figure out all these things are all in GIR files, so I gave it a thought and figured out what's needed. Turns out we are not too far.

So I've been developing GDN (GNOME Development Network) a little django app hosted in github using kamstrup's giraffe.  which takes GIR files and dumps them into static HTML code. The GIR parsing stuff is quite clever and useful, but we need a dynamic app if we want to provide some of the most interesting features, so I'm ussing giraffe's AST to dump all the cross referenced information into an SQL database.

So far I've managed to dump most info, the Django data model is pretty much done, I need to fix some bugs with regards to resolving specific types while crawling the parameters and return.


You need to install my personal giraffe's branch for now until Mikkel comes back from vacation and if you want it to work as I've been adding some missing features to the AST code.

So far I only have backend code no frontend code at all. Stay tuned for more info on this, and if anyone is willing to help make sure you send me an email to aruiz at gnome dot org

Announce: Linux Desktop Testing Project (LDTP) 2.3.0 released

About LDTP:

Linux Desktop Testing Project is aimed at producing high quality test automation framework (using GNOME / Python) and cutting-edge tools that can be used to test Linux Desktop and improve it. It uses the Accessibility
libraries to poke through the application's user interface. We strive to help in building a quality desktop.

Changes in this release:

Added Windows client version for LDTP (Hint: Expect windows version of LDTP soon ;-) )
Updated keycodes based on latest Linux distribution

Bugs fixed:

Fixed twisted gtk2 import in gtk3 environment
Ubuntu 12.04 twisted XMLRPC APIs have been changed, updated accordingly

Special thanks:
Mike Gorse
VMware Desktop UI automation
Tim Miao
Michael Terry
Brain Nitz
Andre Klapper (i18n / l10n suggestions)
Gurdun (To run LDTP from Robot Framework)
Mardy (To run LDTP in QT environment)

Download source

Download RPM
Will schedule deb build in openSUSE build service later

Documentation references:

For detailed information on LDTP framework and latest updates visit

Check LDTP APIs

Report bugs

To subscribe to LDTP mailing lists

IRC Channel - #ldtp on irc.freenode.net

Recent activity

Mentoring, lawyer/developer relations, organising events… a few pieces I’ve written/delivered were released recently.

As an OuterCurve mentor I wrote a short article targeted at project managers considering submitting their projects to the Google Summer of Code this year.

My piece on getting people together was included in the recently released Open Advice book, edited and put together by Lydia Pintscher and others. It’s in great company – there are some excellent articles in there. My personal favourites are “Everyone else might be wrong, but probably notâ€, from Evan Prodromou, “Documentation and my former self†by Anne Gentle, “Software that has the quality with no name†by Federico Mena Quintero and “Who are You, What are You Selling, and Why Should I Care?†by Sally Khudairi, but there are more where those came from.

My write-up of the talk I gave in the Legal Issues DevRoom at FOSDEM, “Gray areas in software licensing†was published on LWN (it’s behing a pay wall for a few days, email me and I’ll share a direct link). Bradley Kuhn informs me that it will be available in audio form in the very near future in the FaiF oggcast.

And my presentation “Crafting Communities to Craft Software†at Redmonk Brew (aka Monkigras), which I reprised in a modified form as “Sustainable mentorship†for FOSDEM in the cross-desktop DevRoom, based largely on an article I wrote a while back was very well received – thank you for the praise! Videos from London and Brussels should be going online soon. In a related note, Kohsuke Kawaguchi’s presentation on creating a developer community was also awesome.

And finally, Stormy Peters published her write-up of the hiring process which led to Karen Sandler becoming the GNOME Foundation Executive Director. I had the pleasure of being part of the process, and I think I contributed something useful to it.

 

Bridges and Balloons

after a rather interesting, albeit not really eventful, journey that spanned cars, buses, a train, and a plane, I’m finally in the lovely Brno — with 2 degrees Celsius and a lot of snow — for the 2012 GTK+ hackfest.

unlike the previous two hackfests, and against my usual inability to write interesting stuff, I’ll try and live-blog the event as much as I can.

as you can see on the wiki page, the agenda is pretty dense, and it’s going to be an intense 6 days hackathon, filled with discussions as much as coding. my part? talking about rainbows and unicorns, obviously.

a lot happened in the months between the Desktop Summit in Berlin, where we first sat down and talked about what Clutter does, and what GTK needs; there has been various progress in the Clutter API towards a sane base for a 2.0 release. if you try and compile an existing application using Clutter with the 1.9 developers snapshots, you’ll notice the depth and breadth of deprecations and API additions. a lot more needs to change — and some of this work on getting from here to there is detailed on the Clutter wiki, under the not at all threatening name of Clutter Apocalypses. I’ll try and write other blog posts about how I envision those changes, and why I think they are necessary for a 2.0 API version.

Documentation hackfest in Brno 2012

[image]Tomorrow I'm taking the train to Brno to participate in the documentation hackfest, with plans to continue the work on generating API documentation from the GIR files that are generated by GObject Introspection.

I will be continuing the work that a bunch of us started in Berlin during the GObject Introspection hackfest last year.

[image]Will be giving as well a workshop on GNOME application development with Python and GObject Introspection as part of the Developer Conference 2012 that Red Hat is organizing there.

[image]Thanks to the GNOME Foundation for sponsoring my accommodation, to my employer Collabora for sponsoring my time there and Red Hat for sponsoring the venue and the food.

February 15, 2012

2012-02-15: Wednesday

Up early, to work, mail, chat with Marc; call with Norbert. Lunch, more mail & admin catchup. Dug through various reviews of LibreOffice, more and less encouraging, looking for nuggets of how we can improve. Poked a number of people with relevant bugs. Worked late.

The Backyard Digging (and filling it back afterwards) Point

Traduction francophone disponible

Dear politician,

If you have been pointed to this text, it is because you tried to justify your position or your actions by the fact that "it saves jobs".

Sorry, you have reached the infamous "Backyard Digging Point". Your argument is invalid. Don't worry, you are not the first nor the last one. Let's see together why this argument is invalid and, even more, why it is very dangerous to rely on it.

Backyard digging

A job is a service that a provider give to a customer in exchange for money (or other form of payment). The job exists as long as the price asked by the provider is inferior to the price the customer is willing to pay. If the customer doesn't want to pay that amount, the provider either has to lower his price, to offer more to the customer or to radically change his business model.

How much would you pay me to dig a big hole in your garden then to fill it back afterwards? As it would probably take me several hours of work, I guess that 200€ is a good price. I would even cut it down to 150€ for you. Would you pay for that? Probably not. Maybe I should consider that a job that nobody is willing to pay for is useless.

As the world is evolving, the society changes. A good business model of the past may not be relevant anymore. New business opportunities appear. Companies could make radical shift and grow even stronger. Or try to stick to their old paradigm and disappear. This happens every day: icemen go out of business because of better and/or cheaper alternatives. It is not a political issue, merely an evolution.

As a politician, you are elected by the citizens. Among your duties, you need to ensure that the state provide some services for less than it would really cost : education, transportation and many others depending on your political stand. Profitability of private businesses should never be your concern. If the service provided is seen as critical but unprofitable, maybe it should be managed by the state in the name of the citizen.

When they earn money, private companies pay politicians to stay far away. But as soon as something may be a threat to their future profitability, they will make friend, asking "to be protected". As a representative of the citizens, not the companies, you should not enter this game. Why?

Firstly because the evolution is unavoidable

Like it or not, the changes you are trying to avoid are already here. You can fight against them and make the transition longer and harder. That's all you will ever gain. It is like building a wall in the middle of a river. At best, you will be able to stop the flow for a few moments. But the water will eventually find its way around your barrier. That means flood, damages. Adapt yourself to the river and let it flow, everything will be easier.

Secondly because it is an economic disaster

Saving jobs or avoiding job loss is only a temporary measure. If the job doesn't pay for itself now, nothing will make it more profitable in the future. You are investing money and effort in a black hole. As a politician, remember that you are not playing with your own money, you are spending the money of your citizens. Your responsibility is to invest in something profitable for all your citizens. True, investing a lot to save some jobs for a few months might make a few votes. Is being re-elected your only political vision?

Thirdly because it is not ethic

Do you think that we should keep death penalty in order not to put the executioner out of a job? Extreme example? What about saving the planet? Why do we still hear that ecology should be balanced with the economy? If there is no planet, there will be no economy anymore.

By trying to "save jobs", you are hindering the natural evolution of the society. New companies, new business models, young entrepreneurs are directly hurt by your attempt at "saving jobs". It is a simple as that: despite all your good intentions, you are in fact destroying future jobs. A lot of businesses will never see the light because of your action.

Fourth, because it makes everyone's life a bit more difficult

Today's technology is wonderful. Administration and paperwork is a thing of the past. With very few investments, most procedures could be automatized, making everyone happy. But, guess what, we fear it. We are trying to make every step a bit more complicated to save the work of the guy putting useless stamps on a piece of paper.

This is mostly visible in public administrations but can be applied to most big organizations. The Luddite fear of "losing jobs" makes us rejecting everything that could make our lives easier. "We have always done like that" or "Everybody is doing that" are excuses, not arguments.

Last but not least, because jobs are not necessary.

Work is just one way of earning an income and having an income is only one way of living. Some people live perfectly happy without income. And, more importantly, a lot of people have an income without working. In fact, there are very few rich people that earn their income from their current work.

Younger generations are often considered lazy because they don't want to work as much as their older counterparts. The reality is that they only want to live more. With today's technology, they don't see why they should waste their time doing useless stuffs. Yes, they will work but only if they see that it is worth the effort, if it's for something they care about. And backyard digging is not one of their priorities.

Backyard digging

Very often, you will hear concerned people saying that not everybody can be an engineer or an artist, that we also have to give some work to the "stupid" people. Just like the world could be separated between “smart-asses†and people that don't have more capabilities than a machine. This question is raised every day since the industrial revolution and, so far, we still exist, globally more prosperous than ever. Nevertheless, some politicians are working hard to make digging your backyard and filling it back mandatory, proud of their patronization for the “stupid†people.

Conclusion

Dear representative of the citizens, from now on, each time you will say “saving jobsâ€, you will think “making people dig their backyard and fill it backâ€. You know that anything which is only justified by the need "to save job" is against the interests of your citizens. Give people more freedom, more time, less stupid stuffs to do and high-value jobs will spontaneously appear. People are not stupid. They may seem so because we are giving them stupid backyard digging to do. If we stop, we will realize how creative the mankind can be. Have you never dreamt of a world without any boring or useless tasks?

And, when you think about it, aren't the "stupid" those who fight and invest in a lost cause? Don't forget that the more the technology evolves, the closer you are to seeing your actual work done by a machine. It is only a matter of time so start investing in the future now.

Pictures by Chiot's Run and Travis S.

Traduction francophone disponible


Flattr our API Documentation

My journey of JHBuild

To better support the latest feature of GTK+3, Gnome-games git master has recently bumped up GTK+ minimum requirement to 3.3.x. However my desktop Ubuntu only provides development packages up to GTK+3.2. As such my local build of Gnome-games was broken. I think it is a good time to try JHBuild.

Ubuntu’s official APT repo has JHBuild package but it is outdated. I gave it a try but ran into many build errors. Soon I switched to its git version and it turned out to be the way to go.

I don’t want to repeat what JHBuild website already has. I will just list what I have encountered in the process of making a working Gnome-games JHBuild build.

First, follow the instructions on JHBuild website until you have run

$ jhbuild build gnome-games

It’s gonna take a quite while to fetch source code from upstream git repos build  and install them. You can do it once and in future, as long as the library dependency is satisfied, we can type

$ jhbuild buildone gnome-games

to just update and build gnome-games itself.

If you already have your local clone of gnome-games, and you just want to install the broken libraries, you can just

$ jhbuild build gtk+

$ jhbuild build clutter

$ jhbuild build clutter-gtk

However, I noticed that the GTK+3 baked by JHBuild didn’t support SVG file which was wildly used in many game apps. It looked like gdk-pixbuf didn’t include the loader for SVG. The trick is

$ jhbuild build librsvg

After that you can check if the SVG loader libpixbufloader-svg.so is in $JHBUILDER_PREFIX/lib64/gdk-pixbuf-2.0/loaders.

Another annoying problem is when you run the games, you probably will see

GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

The reason is that your system dconf is old, and the fix is to

$ jhbuild build dconf

All right. Hopefully this post can help you iron out all the glitches you have when you try to bake Gnome-games with JHBuild. Have fun!


February 14, 2012

2012-02-14: Tuesday

Chewed through mail, bit of patch review and back-porting to older branches. One of the nice side-effects of the renewed focus on bug fixing our 3.5.0 release (for the 3.5.1 freezing next week) is that we've been getting a subset of these into 3.4.6 at the same time, sharing the reviewing burden. Thrilled to see LibreOffice 3.5.0 finally released. We had a beautiful LibreOffice 3.5 new features page created by a kind volunteer: Marc Paré There is a press release, with a rather pretty infographic to match, though there is only so much you can fit into one of those, and we did so much more. Sadly, due to illness, I've not prepared a condensed: "hackers view" of all the hard-to-see nuts, bolts and heavy-lifting behind the scenes; perhaps later. Zonker wrote a really nice review here. Lunch; wrote status report, misc. admin, chat with Ross. Pleased to see Markus' nice work to automatically add bugzilla comments with commit links, when git commits are made that mention that bug, it makes a developer's life just that bit sweeter.

Happy Valentine’s Day

Rygel needs a hand …

Does any of my readers own or have access to a Samsung UE32B7070WW television and would be willing to help to debug a kind of weird browsing issue we’re seeing with this TV? Thanks.

Expat tips: Tunneling Traffic with ‘ssh -D’

I’ve been living outside the US for over a quarter of my life now. With this comes some minor annoyances. One annoyance is that certain Internet sites work ‘better’ when connecting from the US. Luckily we can easily make it look like we are connecting from a US location with the help of the following.

A US-hosted server with ssh access A browser ssh

I’ll assume you have the last two. The easiest way to get the first is in the form of a web host. I use Dreamhost which offers unlimited bandwidth for a pretty good price.

The first step to getting things to work is to login to the US-based server using the following command.

ssh -D PORT_NUMBER username@example.com

For the port number, it’s best to choose a number between 1024 and 49151 while avoiding any commonly used ports. Basically, avoid those listed here. In this example, I chose port 8421.

What this does is setup a SOCKS proxy on your local machine at the port given that can be used to tunnel traffic through to a remote machine, in our case a US-based server. Obviously, this connection needs to be maintained the entire time you want to send traffic through to the remote machine.

Now we just need to tell our browser to send all traffic through this port. In Firefox, go to Edit->Preferences->Advanced->Network->Settings. You should be presented with a window similar to this…
[image]

You’ll notice the 127.0.0.1 (localhost works too) and 8421 in the SOCKS host fields. That’s all that’s required. If you later want to revert just chose ‘No Proxy’ again.

Now you can close the preference dialog and should be able to enjoy surfing the Interwebs as an American. Fuck yeah!

NICE is hiring

As you may know I’ve been working already for a few months in NICE and It has been a great experience so far. Working in the product DCV (Desktop Cloud Visualization) which allows you to run OpenGL applications remotely using VNC with a really good quality it has been something new and challenging for me but also an incredible experience where I am learning a lot and enjoying with my new Colleagues, some of them you may already know them, Paolo Borelli and Paolo Maggi, the ones in charge of gedit too for so many years.

Apart from making an update in my life I would like to point out that NICE is hiring again and there are a few open positions that somebody might be interested in. Go to our webpage for open positions and have a look at it and if you are interested, send us your Resume.

Gentoo: PulseAudio + ALSA update

For a long time now, fellow-Gentoo’ers have had to edit /etc/asound.conf or ~/.asoundrc to make programs that talk directly to ALSA go through PulseAudio. Most other distributions ship configuration that automatically probes to see if PulseAudio is running and use that if avaialble, else fall back to the actual hardware. We did that too, but the configuration wasn’t used, and when you did try to use it, broke in mysterious ways.

I finally got around to actually figuring out the problem and fixing it, so if you have custom configuration to do all this, you should now be able to remove it after emerge’ing media-plugins/alsa-plugins-1.0.25-r1 or later with the pulseaudio USE flag. With the next PulseAudio bump, we’ll be depending on this to make the out-of-the-box experience a lot more seamless.

This took much longer to get done than it should have, but we’ve finally caught up. :)

[Props to Mart Raudsepp (leio) for prodding me into doing this.]

February 13, 2012

Getting Thing GNOME is alive (and released)!

TLDR: GTG 0.2.9 has been released, spread the word!.

For those who don't know Getting Things GNOME yet, it is a todo manager. In fact, it is, to my knowledge, the only todo manager that :

has a clean and simple UI (see my French explanation to use GTG) allows you to have infinite level of subtasks to have the same task being the subtask of multiple parents to easily classify your tasks with colours and tags allows you to see only the task that can be done right now with the concept of workview allows you to quickly enter a lot of tasks in a few keystrokes has a DBus interface

gtg029.png

As a result, gtg was in the Techradar's top 50 best Linux application of 2011 despite the lack of regular releases. It is probably packaged as "gtg" in your distribution so it is probably better that you try by yourself.

For the last year, I've been often asked if GTG was dead, if we planned to release something new.

This is my fault and I apologize for such a long dead time. I could explain you all the oddities GTG went through but it is not interesting. I will talk you a bit more about the solution we created when the liblarch documentation will be finished. The good news is that GTG is not dead and that we have been actively working on it in the last two years, including some wonderful GSoC.

Izidor, my GSoC student, is now the co-maintainer of GTG and released 0.2.9 today. Last week, he came from Germany to Belgium to sleep with my cat, enjoy the Frozdem (Frozen Fosdem) and, as a side effect, polish all the little details that would make 0.2.9 a rocking release.

Izidor and Lionel at FOSDEM 2012

Why 0.2.9 ? That's the bad news part! Mainly because the "backends" feature, which allows you to store/retrieve your task from an external source, is still very unstable and most of the backends had to be disabled for the release. But don't worry, we want to stick to a much shorter release cycle and bring a polished 0.3 in a few weeks. I hope I will learn from mistakes of the past.

Nevertheless, let's celebrate the first release in nearly two years. Please share the news, package GTG, report bugs, help us, follow us on G+ and spread the word.

By the way, we are looking for a communication manager/webmaster and a Django/CSS/JS hacker to work with us on a GTG web interface. If you want to join a cool project with an insane potential, contact me!


Flattr our API Documentation

A leap from user to developer, status: mid-air

My transition from a GNOME user to a developer has been in progress for two months now. I’m enjoying the challenges, but one constant annoyance has been bothering me along my journey:

The transition from user to developer seems to assume that in between I have had time to hack Linux for 10 years.

Well, I had a total of 0 days for that. I have grown up with the pleasure of not needing to know all the mysterious commands in terminal to get my Ubuntu running. Yes, I have memorized a couple of handy ones (killall -9 the programs!) but as a whole I’m a GUI-girl. I love to make small apps for myself to use, I like coding, but still without the OPW I would have given up already. For me the stumbling block is that the leap from user to developer is huge!

The thing that prompted this post was the setup for JHBuild. I felt uncertain and there were many things I wouldn’t have dared to do without the help of a friend. My dream would be to able to concentrate to the main thing itself with necessary information available without the presumption of being a hardcore Linux hacker.

There is need for both kinds of documentation: for those who are familiar with every nook and cranny of GNOME and Linux, and for those who have just had the great idea that they could have something to give to this community. I’m working towards my dream of having the latter, and I hope my documentation efforts will make this path easier for the enthusiastic hackers that come after me!

See you soon in Brno!


/etc/os-release

One of the new configuration files systemd introduced is /etc/os-release. It replaces the multitude of per-distribution release files[1] with a single one. Yesterday we decided to drop support for systems lacking /etc/os-release in systemd since recently the majority of the big distributions adopted /etc/os-release and many small ones did, too[2]. It's our hope that by dropping support for non-compliant distributions we gently put some pressure on the remaining hold-outs to adopt this scheme as well.

I'd like to take the opportunity to explain a bit what the new file offers, why application developers should care, and why the distributions should adopt it. Of course, this file is pretty much a triviality in many ways, but I guess it's still one that deserves explanation.

So, you ask why this all?

It relieves application developers who just want to know the distribution they are running on to check for a multitude of individual release files. It provides both a "pretty" name (i.e. one to show to the user), and machine parsable version/OS identifiers (i.e. for use in build systems). It is extensible, can easily learn new fields if needed. For example, since we want to print a welcome message in the color of your distribution at boot we make it possible to configure the ANSI color for that in the file.

FAQs

There's already the lsb_release tool for this, why don't you just use that? Well, it's a very strange interface: a shell script you have to invoke (and hence spawn asynchronously from your C code), and it's not written to be extensible. It's an optional package in many distributions, and nothing we'd be happy to invoke as part of early boot in order to show a welcome message. (In times with sub-second userspace boot times we really don't want to invoke a huge shell script for a triviality like showing the welcome message). The lsb_release tool to us appears to be an attempt of abstracting distribution checks, where standardization of distribution checks is needed. It's simply a badly designed interface. In our opinion, it has its use as an interface to determine the LSB version itself, but not for checking the distribution or version.

Why haven't you adopted one of the generic release files, such as Fedora's /etc/system-release? Well, they are much nicer than lsb_release, so much is true. However, they are not extensible and are not really parsable, if the distribution needs to be identified programmatically or a specific version needs to be verified.

Why didn't you call this file /etc/bikeshed instead? The name /etc/os-release sucks! In a way, I think you kind of answered your own question there already.

Does this mean my distribution can now drop our equivalent of /etc/fedora-release? Unlikely, too much code exists that still checks for the individual release files, and you probably shouldn't break that. This new file makes things easy for applications, not for distributions: applications can now rely on a single file only, and use it in a nice way. Distributions will have to continue to ship the old files unless they are willing to break compatibility here.

This is so useless! My application needs to be compatible with distros from 1998, so how could I ever make use of the new file? I will have to continue using the old ones! True, if you need compatibility with really old distributions you do. But for new code this might not be an issue, and in general new APIs are new APIs. So if you decide to depend on it, you add a dependency on it. However, even if you need to stay compatible it might make sense to check /etc/os-release first and just fall back to the old files if it doesn't exist. The least it does for you is that you don't need 25+ open() attempts on modern distributions, but just one.

You evil people are forcing my beloved distro $XYZ to adopt your awful systemd schemes. I hate you! You hate too much, my friend. Also, I am pretty sure it's not difficult to see the benefit of this new file independently of systemd, and it's truly useful on systems without systemd, too.

I hate what you people do, can I just ignore this? Well, you really need to work on your constant feelings of hate, my friend. But, to a certain degree yes, you can ignore this for a while longer. But already, there are a number of applications making use of this file. You lose compatibility with those. Also, you are kinda working towards the further balkanization of the Linux landscape, but maybe that's your intention?

You guys add a new file because you think there are already too many? You guys are so confused! None of the existing files is generic and extensible enough to do what we want it to do. Hence we had to introduce a new one. We acknowledge the irony, however.

The file is extensible? Awesome! I want a new field XYZ= in it! Sure, it's extensible, and we are happy if distributions extend it. Please prefix your keys with your distribution's name however. Or even better: talk to us and we might be able update the documentation and make your field standard, if you convince us that it makes sense.

Anyway, to summarize all this: if you work on an application that needs to identify the OS it is being built on or is being run on, please consider making use of this new file, we created it for you. If you work on a distribution, and your distribution doesn't support this file yet, please consider adopting this file, too.

If you are working on a small/embedded distribution, or a legacy-free distribution we encourage you to adopt only this file and not establish any other per-distro release file.

Read the documentation for /etc/os-release.

Footnotes

[1] Yes, multitude, there's at least: /etc/redhat-release, /etc/SuSE-release, /etc/debian_version, /etc/arch-release, /etc/gentoo-release, /etc/slackware-version, /etc/frugalware-release, /etc/altlinux-release, /etc/mandriva-release, /etc/meego-release, /etc/angstrom-version, /etc/mageia-release. And some distributions even have multiple, for example Fedora has already four different files.

[2] To our knowledge at least OpenSUSE, Fedora, ArchLinux, Angstrom, Frugalware have adopted this. (This list is not comprehensive, there are probably more.)

A day in my life with the GNOME Shell

So I have been using the GNOME shell for quite some time now, and I guess like any desktop experience it has its ups and downs, but at least I think I reached a stage where my remaining quibbles with the GNOME Shell is related to how it works as opposed to irritations caused by me being used to something else. One thing I keep asking myself is if GNOME Shell has in any way made me more or less productive, my guess is that the change has been mostly productivity neutral once I got used to the new setup.

That said I have some smallish irritations with the GNOME Shell, the biggest being that the menu system feels slow, it feels distinctly slower than GNOME 2.x to click into Activities->Applications->Category to get to the application I am looking for, especially if I haven’t done so in a bit and the icons have to be pulled from disk. Also the fact that the categories is on the right side of the screen means a long mouse journey across the screen to get to the categories, and then a long mouse journey usually back towards the left side of the screen to click on the application I want. Ok, so this is not an operation I perform every 5 minutes, but still it feels a bit to laborious for what it is.

The other frustration I have is with the notification dock at the bottom of the screen, but I suspect this is mostly application issues. Like for instance gtimelog seems to have a different behaviour if you click on the text or the icon, and with the icon being so small I sometimes overshot, which causes the irritation of having to move a ‘long’ way back to due the neighbouring icon having expanded. Other small irritations includes the the Banshee icon saying ‘notify-sharp’ instead of Banshee and getting a ton of notification messages on the status bar as peoples IM client set them to offline/away etc.

Hmm, actually having written my irritations down I do feel they feel rather small and insignificant, yet if someone sees this I hope these items will be improved upon for future versions.

Also I do think that the system menu should offer shut down/restart by default, if I hadn’t seen someone mentioning it on IRC some Months back I am sure I to this day wouldn’t have realized I could press ‘alt’ to get shutdown/reboot to appear in the menu. I know there is an extension now, but it is such a basic operation that should require knowing ‘secret’ buttons getting an extension.

Meet the Hackers

This past week, I've started to get back into photography a bit more (thanks, Nina!) and started taking my camera into the office with me every day to remind myself to take photos. As a result, I've taken a bunch of photographs of my co-workers in the office.

Would you like to meet the hackers?

The Founders

Most of you would probably recognize the infamous Miguel de Icaza, Xamarin's CTO:

Miguel de Icaza

Next up is our very own Steve Jobs, Nat Friedman, our CEO and the man who reminds us to pay attention to the details:

Nat Friedman

Another person many of you will recognize is our very own COO, Joseph Hill:

Joseph Hill

MonoDevelop Team

Well, okay, I've only got a photo of the famous Michael Hutchinson, but he's a very important player in the development of MonoDevelop.

Michael Hutchinson

QA Team

Next up, we have the QA team. They do their best to make sure that we, the developers, didn't break anything. When they aren't testing a specific application before a launch, they hammer away at our products and try to find weak spots in our code (but we still love them anyway!)

This is PJ, and as you can see, he's demonstrating how to QA popcorn corn cobs:

PJ

(Did it pass the test, PJ?)

Next up is Lindsey. She's been working on writing automated tests to make it less likely for releases to include regressions. Let's hope she's successful!

Lindsey

Release Team

Alex Corrado is the man behind the curtain. He's our head Release Team engineer and also the brilliant mastermind that started CXXI, the Mono C++ interop project that we hope to give him time to finish someday soon.

Alex Corrado

Web Team

The newest addition to our ranks (just this week, in fact!), but long-time contributor to the Mono project, is Bojan Rajković. You can see we've already put him to work (he is no doubt puzzling over some ASP.NET code on his screen).

Bojan Rajković

Documentation Team

Nina is the only Cambridge resident on our Docs Team. Specifically, she hacks on our Documentation Portal. She's also the one who has encouraged me to get back into taking photographs, so she'll have to put up with me using her as a guinea pig the most. Here she is taunting me with her hot cup of Chaider:

Nina

February 12, 2012

Some things you may have heard about Secure Boot which aren't entirely true

Talking about Secure Boot again, I'm afraid. One of the things that's made discussion of this difficult is that, while the specification isn't overly complicated, some of the outcomes aren't obvious at all until you spend a long time thinking about it. So here's some clarification on a few points.

Secure Boot provides no additional security

Untrue. Attacks against the pre-boot environment are real and increasingly common - this is a recent proof of concept, and this has been seen in the wild. Once something has got into the MBR, all bets are off. It can modify your bootloader or kernel, inserting its own code to return valid results whenever any kind of malware checker scans for it. The only way to reliably identify it is to either move the disk to another system or to cold boot off verified media. By restricting pre-OS code to something that's been signed, Secure Boot does provide enhanced security.

Secure Boot is just another name for Trusted Boot

Untrue. Trusted Boot requires the ability to measure the entire boot process, which gives the OS the ability to figure out everything that's been run before OS startup. The root of trust is in the hardware and a TPM is required. Secure Boot is simply a way to limit the applications that are run before the OS. Once booted, there is no way for the OS to identify what was previously booted, or even if the system was booted securely.

Microsoft are just requiring that vendors implement the specification

Untrue. Quoting from the Windows 8 Hardware Certification Requirements:

MANDATORY: No in-line mechanism is provided whereby a user can bypass Secure Boot failures and boot anyway Signature verification override during boot when Secure Boot is enabled is not allowed. A physically present user override is not permitted for UEFI images that fail signature verification during boot. If a user wants to boot an image that does not pass signature verification, they must explicitly disable Secure Boot on the target system.

Section 27.7.3.3 of version 2.3.1A of the UEFI spec explicitly permits implementations to provide a physically present user override. Whether this is a good thing or not is obviously open to argument, but the fact remains that Microsoft forbid behaviour that the specification permits.

Secure Boot can be used to implement DRM

Untrue. The argument here is that Secure Boot can be used to restrict the software that a machine can run, and so can limit a system to running code that implements effective copy protection mechanisms. This isn't the case. For that to be true, there would need to be a mechanism for the OS to identify which code had been run in the pre-OS environment. There isn't. The only communication channel between the firmware and the OS is via a single UEFI variable called "SecureBoot", which may be either "1" or "0". Additionally, the firmware may provide a table to the OS containing a list of UEFI executables that failed to authenticate. It is not required to provide any information about the executables that authenticated correctly.

In both these cases, the OS is required to trust the firmware. If the firmware has been compromised in any way (such as the user turning off Secure Boot), the data provided by the firmware can be trivially modified and the OS told that everything is fine. As long as machines exist where users are permitted to disable Secure Boot, Secure Boot is not any kind of DRM scheme.

Secure Boot provides physical security

Untrue. Secure Boot does not in any way claim to improve security against attackers who have physical access, for the same reasons as the DRM case. The OS has no way to determine that the firmware's behaviour has been modified. A physically-present attacker can simply disable Secure Boot and install a piece of malware that lies to the OS about platform security. The "Evil Maid" attack still exists.

Secure Boot only defines the interaction between the firmware and the bootloader. It doesn't specify any higher policy

Misleading. It's true that Secure Boot only specifies the authentication of pre-OS code. However, if you implement Secure Boot it's because you want to ensure that only authenticated code has run before your OS. If there is any way for unauthenticated code to touch the hardware before your OS starts, you can't ensure that. If an authenticated Linux kernel is booted and then loads an unsigned driver, that unsigned driver can fabricate a fake UEFI environment and then launch Windows from it. Windows would falsely believe that it has booted securely. If that authenticated Linux kernel were widely distributed, attackers could use it as an attack vector for Windows. The logical response from Microsoft would be to blacklist that kernel.

The inevitable outcome of implementing Secure Boot is that every component that can touch hardware must be signed. Anyone who implements Secure Boot without requiring that is adding no additional security whatsoever.

Only machines that want to boot Windows need to carry Microsoft's keys

Again, misleading. Microsoft only require one signing key to be installed, and the Windows bootloader will be signed with a key that chains back to this one. However, the bootloader is not the only component that must be signed. Any drivers that are carried on ROMs on plug-in cards must also be signed. One approach here would have been for all hardware vendors to have their own keys. This would have been unscalable - any shipped machine would have to carry keys for every vendor who produces PCI cards. If a machine carried an nvidia key but not an AMD one, swapping a geforce for a radeon would have resulted in the firmware graphics driver failing to load. Instead, Microsoft are providing a signing service. Vendors will be able to sign up for WHQL membership and have their UEFI drivers signed by Microsoft.

This leads to the problem. The Authenticode format used for signing UEFI objects only allows for a single signature. If a driver is signed by Microsoft, it can't be signed by anybody else. Therefore, if a system vendor wants to support off-the-shelf PCI devices with Microsoft-signed drivers, the system must carry Microsoft's key. If the same key is used as the root of trust for the driver signing and for the bootloader signing, that also means that the system will boot Windows.

This is only a problem for clients, not servers

Not strictly true. While Microsoft's current requirements don't mandate the presence of Secure Boot on server hardware, if present it must be enabled and locked down as it is for clients. It's not valid for servers to ship with disabled Secure Boot support, or for it to be shipped in a mode allowing users to make automated policy modifications at OS install time.

Secure Boot is required by NIST

This is one that I've heard from multiple people working on Secure Boot. It's amazingly untrue. The document they're referring to is NIST SP800-147, which is a document that describes guidelines for firmware security - that is, what has to be done to ensure that the firmware itself is secure. This includes making sure that the OS can't overwrite the firmware and that firmware updates must be signed. It says absolutely nothing about the firmware only running signed software. Secure Boot depends upon the firmware being trusted, so these guidelines are effectively a required part of Secure Boot. But Secure Boot is not within the scope of SP800-147 at all.

It's easy for Linux to implement Secure Boot

Misleading. From a technical perspective, sure. From a practical perspective, not at all. I wrote about the details here.

It's only a problem for hobbyist Linux, not the real Linux market

Untrue. It's unclear whether even the significant Linux vendors can implement Secure Boot in a way that meets the needs of their customers and still allows them to boot on commodity hardware. A naive implementation removes many of the benefits of Linux for enterprise customers, such as the ability to use local modifications to micro-optimise systems for specific workloads. One of the key selling points of Linux is the ability to make use of local expertise when adapting the product for your needs. Secure Boot makes that more difficult.

Conclusion

Much reporting on the issues surrounding Secure Boot so far has been inaccurate, leading to misunderstandings about the (genuine) benefits and the (genuine) drawbacks. Any useful discussion must be based around an accurate understanding of the specification rather than statements from analysts with no real understanding of the Linux market or security.

comment count unavailable comments

February 11, 2012

C# for Gaming: Slides

You can now get the Slides for my Mono for Game Development talk.

Or you can go straight to the resources for the talk.

11 Feb 2012

buzztard

The first big change after releasing 0.6 was to move from svn to git. SourceForge offers git since a while, but does not provide any tips how to do the transition. Fortunately it is a popular topic though. I used svn2git for the main conversion. I fixed the author tags from svn commit messages (Patch-by:) manually using git rebase -i as I could not get a filter-branch script for it to work. A few times gitk got confused and I had to remove my .git/gitk.cache, one symptom are missing tags. I updated the enlistments on ohloh and tweaked the git hooks to have the same functionality as before.

A first code wise change was to move the bsl module into the buzztard one. It is a small module for the buzztard song-loader plugin and it is not needed if you don't want to load buzz songs. But it is small and has no further dependencies and thus it is easier to just include it. Especially as we plan to add other loaders in the coming cycle(s).

In the editor I bumped the required gtk version to get rid of some #ifdef and be able to use newer API. I replaced the ruler widgets in volume and panorama popups with with scale markers. Those look nicer and take the scale handle size into account. Unfortunately they were almost untested. I made the needed patches for gtk-2-24, gtk-3-2 and gtk-HEAD [1],[2]. I could also made workarounds for the issue for the time being. So for the time being, don't use inverted ranges on your scales and don't use an adjustment with fractions (use 0 .. 100 instead of 0.0 to 1.0).

Most of the work went in the the interaction controller. The controller assignment in the UI is a bit more discoverable (content menu not only on main widgets, but also on the label and value label). Controllers can be assigned to combo-boxes too (mapped to enums). We have controllers for note-on midi messages and the velocity that comes with it now.

The other bigger change is that we now have persistent audio sessions (right now only enabled for jack). We're basically keep the sink alive across songs and also keep it in a resource allocated state. This gives a little speedup on the playback startup, but the main motivation was to allow to configure linkage of buzztard with other jack client in qjackcontrol. This is also an enabler for transport sync support. I have landed initial support for this in gstreamer-git.

There were also a few smaller changes for user feedback on docs and new tips. The design folder got more experiments.

485 files changed, 2638 insertions(+), 2033 deletions(-)

Cutting Through The Anti-Copyleft Political Ruse

I'd like to thank Harald Welte for his reasoned and clear blog post about GPL enforcement which I hope helps to clear up some of the confusions that I also wrote about recently.

Harald and I appear to agree that all enforcement actions should request, encourage, and pressure companies toward full FLOSS compliance. Our only disagreement, therefore, is on a minor strategy point. Specifically, Harald believes that the “reinstatement of rights lever†shouldn't be used to require compliance on all FLOSS licenses when resolving a violation matter, and I believe such use of that lever is acceptable in some cases. In other words, Harald and I have only a minor disagreement on how aggressively a specific legal tools should be utilized. (I'd also note that given Harald's interpretation of German law, he never had the opportunity to even consider using that tool, whereas it's always been a default tool in the USA.) Anyway, other than this minor side point, Harald and I appear to otherwise be in full in agreement on everything else regarding GPL enforcement.

Specifically, one key place where Harald and I are in total agreement is: copyright holders who enforce should approve all enforcement strategies. In every GPL enforcement action that I've done in my life, I've always made sure of that. Indeed, even while I'm a very minor copyright holder in BusyBox (just a few patches), I still nevertheless defer to Erik Andersen (who holds a plurality of the BusyBox copyrights) and Denys Vlasenko (who is the current BusyBox maintainer) about enforcement strategy for BusyBox.

I hope that Harald's post helps to end this silly recent debate about GPL enforcement. I think the overflowing comment pages can be summarized quite succinctly: some people don't like copyleft and don't want it enforced. Others disagree, and want to enforce. I've written before that if you support copyleft, the only logically consistent position is to also support enforcement. The real disagreement here, thus, is one about whether or not people like copyleft: that's an age-old debate that we just had again.

However, the anti-copyleft side used a more sophisticated political strategy this time. Specifically, copyleft opponents are attempting to scapegoat minor strategy disagreements among those who do GPL enforcement. I'm grateful to Harald for cutting through that ruse. Those of us that support copyleft may have minor disagreements about enforcement strategy, but we all support GPL enforcement and want to see it continue. Copyleft opponents will of course use political maneuvering to portray such minor disagreements as serious policy questions. Copyleft opponents just want to distract the debate away from the only policy question that matters: Is copyleft a good force in the world for software freedom? I say yes, and thus I'm going to keep enforcing it, until there are no developers left who want to enforce it.

February 10, 2012

A New Approach to GNOME Application Design

One of the things that the GNOME design crew have been focusing on recently is creating a new approach to application design for GNOME 3. We want GNOME applications to be thoroughly modern, and we want them to be attractive and a delight to use. That means that we have to do application design differently to how we’ve done it in the past.

Design is always an iterative process, and the new GNOME application design approach has been steadily evolving for some time. There have been lots of design ideas and mockups, and there has been plenty of testing of prototypes and of proper implementations. This process has resulted in some design patterns being consigned to the scrapheap while others have come to have an increasingly important place in our hearts. Slowly but surely, things are starting to fall into place.

As the new GNOME 3 application design approach has stabilised, we have been able to pursue the development of more new applications. GNOME Documents and Contacts have been joined by Boxes, Web and Clocks. We also have designs in the works for many other new applications, including Mail, Videos, Chat, Photos, Calendar and more. Each of these new designs utilise the application design approach that we have been developing. We are also starting to document our new application design approach in a new version of the HIG. This will help application developers to create their own GNOME 3 apps.

In what remains of this post I’m going to try to give you a taste of the new application designs, as well as give a bit of background about why they have been designed in the way that they are.

Maximised Windows

GNOME Web Mockup

Displaying multiple windows at the same time means that screen space isn’t used efficiently, and it means that you don’t get a focused view of what it is that you are interested in. Windows that aren’t maximised also create additional tasks for people. Often you need to adjust their size, or you have to move them around.

These are just some of the reasons why GNOME 3 applications have a particular approach to windows. In general, their primary windows will maximise by default, and they will lose their titlebars when they are maximised (smaller utility applications will not be affected by this). This will mean that the screen will be dominated by the window that you are focused on. It will also mean that the maximum amount of screen space will be devoted to useful stuff (like content).

Views

Each window of a GNOME 3 application can display different views, so that you can navigate to different parts of the app within it. Breaking up an interface into different views makes it more efficient and more pleasurable to use. It means that the content and controls that are displayed are always relevant to the task in hand, and means that superfluous interface elements are kept to a minimum.

GNOME Music Mockup

The designs for the GNOME 3 Music app are a great example of this. It contains a view for browsing and a view for looking at a particular album, artist or playlist. Each view only contains content that is relevant to the current activity, meaning that each experience is enhanced, and that you travel through the application to the functionality that you want, rather than having it presented to you all at the same time.

Primary Toolbars

The Clocks Primary Toolbar

In GNOME 2, primary toolbars were like a toolboxes. They were a mixed bag, containing a variety of things that might or might not be useful to you at any given time. There was also a lack of consistency between apps, and the layout of toolbars often didn’t help you to understand their functionality. Together, this gave toolbars a high cognitive overhead and meant that they lacked visual elegance.

GNOME 3 primary toolbars are a bit different. They will only contain a few elements, and they will be much more consistent across applications, making them much easier to use. Their contents will also follow common alignment points, so they will look much nicer.

Primary toolbars in GNOME 3 also play a navigation role. They take over the job of labelling the view from the window titlebar, and they are at the top of the user interface’s hierarchy, framing content and providing key mechanisms for interacting with it. They’re object orientated.

Selections and Contextual Actions

GNOME Documents - Selections and Actions

The design pattern for making selections and acting on them is the result of a lot of work. It has been through quite a few iterations. Jimmac even created a whole series of html prototypes to help determine the best approach. There’s still one online that you can try.

Selections and contextual actions revolve around the checkmark button. Pressing it activates an overlay that allows multiple items to be selected and acted on using an overlaid toolbar.

The new design makes selecting multiple items possible without the need for a keyboard (since shift and alt modifiers aren’t required) and is touch compatible. Providing a separate space for contextual actions also guides users by providing a consistent mechanism for acting on content.

Search

GNOME Documents Mockup - Search

Search can be an incredibly powerful tool, and it is central to GNOME 3 application design. Search will be ubiquitous and instantly available within GNOME 3 applications. If you are not editing a text field or a document, all you have to do is start typing to initiate a search.

Search will also be accessible using this nifty pull-down search design. This is a nice way of making search always available without having search boxes attached to every single grid or list of content. There are also variants of the design pattern that will allow you to use predefined filters on your content.

And more

There are many other application design patterns that we’ve been working on, including application menus, a new grid view for displaying collections of content, in-app notifications, new models for dialogs, nice full screen controls and a sidebar list pattern. Together, these provide the opportunity to create applications that efficient, modern, elegant, and a pleasure to use

The design patterns that I’ve introduced in this post aren’t the end of the story though. This new approach to GNOME application design is still evolving. We’re still testing the patterns we have come up with, and there are still missing pieces to this new application design approach. We are still investigating how to make maximised windows work well on very large screens, for example.

As the new GNOME applications develop, so will the design patterns. Everyone who is working on these new applications – both developers and designers – are helping to determine the shape of GNOME’s next generation of applications. And if you want to contribute you can also play a part.

Edit:

Judging by the comments it would seem that there is a bit of confusion about what is meant by maximising windows by default, so let me try and clarify:

Not all applications will use this behaviour – only those that have been designed to do so. If an app won’t work being maximised, it won’t be. Although these applications will maximise by default, it will still be possible to unmaximise them. If you want to be able to view more than one window at once you will still be able to do so. There will be mechanisms put in place that will adjust the behaviour to compensate for large screens. We are currently investigating a number of options here, including not automatically maximising windows on these large screens or adjusting their layout to make best use of the extra space. Everyone involved is well aware of the need to work well with large screens!

Comments on this post are now closed


Rebuilding older rpms

Today I needed an xml diff tool. There seem to be an xmldiff and a diffxml, neither of them packaged by Fedora at the moment. I found an old src.rpm for Fedora 6 for xmldiff 0.6.8

The src.rpm doesn’t rebuild as is for various reasons: its %check stage imports unittest2, so I disabled check. Then it didn’t find debuglist.files, so I disabled building a debug package. And then it found an installed egg file which it didn’t like, so I disabled checking for installed files.

Since I’m going to forget how I did this in the future when I will need this again for some obscure reason, and because if you ever build rpms you may find this useful, here is the command that did it for me for Fedora 15:
rpmbuild --rebuild -D '%check exit 0' -D 'debug_package %{nil}' -D '_unpackaged_files_terminate_build exit 0' xmldiff-0.6.8-1.fc6.src.rpm

Now, back to comparing xml files.

PyGObject gets a splash of new blood

Things as they are, few hackers get to work on the same project their whole life. No matter how deep one has been involved in a project, and how much effort was put in, there are many reasons why at some point one may decide to distance from it.

For different reasons, the people who have been maintaining PyGObject for the last couple of years (since the move to introspection) aren't currently using it much any more, which isn't ideal because it means they can allocate less time to maintenance and also lack the guidance of their own motivation.

Fortunately for PyGObject, a bunch of heroic hackers have stepped forward to take the responsibility of maintaining it:
Martin Pitt Paolo Borelli Ignacio Casal Quintero Sebastian Pölsterl
For now I remain listed in the .doap file, but as I'm not using PyGObject myself any more (even though Collabora sponsors some of my time working on PyGObject), my involvement will be limited to occasional patches and code reviews as I find time.

My thanks and admiration to those who have maintained PyGObject in the past:
Johan Dahlin James Henstridge John (J5) Palmieri Simon van der Linden Zach Goldberg Gustavo J Carneiro Paul Pogonyshev Gian Mario Tagliaretti
To end, just note that Martin is using his canonical.com address, so I assume that Canonical is sponsoring his work as maintainer upstream, so kudos to them as well.

Gwibber logo concepts, opinions?

I’ve had a number of people suggest Gwibber could use a new logo, but nobody has actually stepped up and designed anything.  Recently I had the good fortune to chat with Abi Rasheed on IRC who volunteered to help.  He has put together a couple of great concepts, and we would like to gather some feedback.

I’ve posted the concepts on the wiki, please check them out and provide some feedback.

Thanks!

 

February 09, 2012

Is GPL usage really declining?

Matthew Aslett wrote about how the proportion of projects released under GPL-like licenses appears to be declining, at least as far as various sets of figures go. But what does that actually mean? In absolute terms, GPL use has increased - any change isn't down to GPL projects transitioning over to liberal licenses. But an increasing number of new projects are being released under liberal licenses. Why is that?

The figures from Black Duck aren't a great help here, because they tell us very little about the software they're looking at. FLOSSmole is rather more interesting. I pulled the license figures from a few sites and found the following proportion of GPLed projects:

RubyForge: ~30%
Google Code: ~50%
Launchpad: ~70%

I've left the numbers rough because there's various uncertainties - should proprietary licenses be included in the numbers, is CC Sharealike enough like the GPL to count it there, that kind of thing. But what's clear is that these three sites have massively different levels of GPL use, and it's not hard to imagine why. They all attract different types of developer. The RubyForge figures are obviously going to be heavily influenced by Ruby developers, and that (handwavily) implies more of a bias towards web developers than the general developer population. Launchpad, on the other hand, is going to have a closer association with people with an Ubuntu background - it's probably more representative of Linux developers. Google Code? The 50% figure is the closest to the 56.8% figure that Black Duck give, so it's probably representative of the more general development community.

The impression gained from this is that the probability of you using one of the GPL licenses is influenced by the community that you're part of. And it's not a huge leap to believe that an increasing number of developers are targeting the web, and the web development community has never been especially attached to the GPL. It's not hard to see why - the benefits of the GPL vanish pretty much entirely when you're never actually obliged to distribute the code, and while Affero attempts to compensate from that it also constrains your UI and deployment model. No matter how strong a believer in Copyleft you are, the web makes it difficult for users to take any advantage of the freedoms you'd want to offer. It's as easy not to bother.
So it's pretty unsurprising that an increase in web development would be associated with a decrease in the proportion of projects licensed under the GPL.

This obviously isn't a rigorous analysis. I have very little hard evidence to back up my assumptions. But nor does anyone who claims that the change is because the FSF alienated the community during GPLv3 development. I'd be fascinated to see someone spend some time comparing project type with license use and trying to come up with a more convincing argument.

(Raw data from FLOSSmole: Howison, J., Conklin, M., & Crowston, K. (2006). FLOSSmole: A collaborative repository for FLOSS research data and analyses. International Journal of Information Technology and Web Engineering, 1(3), 17–26.)

comment count unavailable comments

C# for Gaming: AltDevConf This Weekend

It is a great honor to participate this weekend on the online AltDevConf conference. This is an online two-day event

Our goal is twofold: To provide free access to a comprehensive selection of game development topics taught by leading industry experts, and to create a space where bright and innovative voices can also be heard. We are able to do this, because as an online conference we are not subject to the same logistic and economic constrains imposed by the traditional conference model.

I will be participating in the talk on Cross Platform Game Development using C# with Matthieu Laban and Philippe Rollin.

You can register here for our session on Saturday at 3pm Eastern Standard Time, noon Pacific Time, and 9pm Paris Time.

If you are located in the Paris time zone, that means that you get to enjoy the talk sipping a tasty hot chocolate with some tasty baguettes.

Problems with current GtkFileChooserDialog usability

Dear GTK devs I’ve been encountering some problems in the current behavior of the latest versions of GtkFileChooserDialog, so just in case It is me that I don’t understand the current behavior I’ll put them here:

Right now when we want to open a file a in gedit the Recently Used item is selected. This is a really really bad behavior in my opinion for applications like gedit or gitg where we already provide a way to go to the recently used documents and what we really want is to show the directory where the user is working as it is highly probable that will want a file or directory from the directory it is working on or from one near to that one. Please recommend us a way to get back the previous behavior so we will not have to do crazy things like listening to map and unmap signals to place the right directory to show in our specific applications. Another problem that I have been encountering and I don’t know if it is a new feature or a bug, is that if I click on the list view of directories and I press enter in a directory, the new directory is opened but the focus changes to the Location entry instead of keeping it in the list view. Please let me know if there is some API or a way I can use to get the previous behavior back. If it is a bug I can even provide some patches.

Writing a mixed Gtk / Javascript application

In my last blog post I mentioned the embedding of a javascript library inside Stoq. I got a couple of requests which asked me how this was accomplished, this blog post attempts to explain some of it.

Of course we need to use the great WebKitGtk library. Unfortunately we cannot use the introspection based bindings as this needs to work on Gtk+ 2.18 and PyGTK 2.17 which were shipped in the last Ubuntu LTS release.

WebView will do all the html/css/js parts. It’s almost as simple as a normal GtkTextView, add it to a scrolled window, load the content and off you go.

The first challange comes when you want to open http:// links in your normal browser, instead of handling them in your webkit. To do that you need to listen the navigation-policy-decision-requested signal ignore certain requests. You don’t actually need to use http protocols, you can invent any url which is parsable.

Next problem is AJAX, to write a proper asynchronous widget you don’t want to reload the whole page when something changes. Since we cannot implement our own protocols in the old libsoup bindings shipped for PyGTK we need to run our own http server. That is good for other reasons as well, we can do heavy IO such as database queries in there without actually blocking the user interaction.

When we need to execute scripting in gtk we just call web_view_execute_script() which will just execute a piece of javascript. For instance,

view.execute_script(“document.title = $(‘fc-header-title’).text()†is a actual line in Stoq, it sets the window title based on calendar header title from the dom.

Going the other direction is a bit uglier, the only way of communcation I found out was opening new urls, so I implemented an application specific domain which opens a dialog or some other action within the gtk application.

I know that some of these tricks are already outdated, in newer webkitgtk versions you should write your own libsoup handlers, use the gobject dom bindings for communication, but I didn’t have these options when writing this post

TL;DR

Listen to the ::navigation-policy-decision-requested to implement your own uri handling if you can’t do it via libsoup. Run a separate daemon process which will serve as an internal webserver, so AJAX calls work and won’t block on IO. Use web_view_execute_script() for Gtk->Javascript communication Use window.location = “customprotocol://† for Javascript ->Gtk communication Make the javascript parts work in a normal browser so the normal developer tools can be used If possible, use a newer version of WebKitGtk and avoid all of this.

Xan and the other webkit hackers will probably look at me in disgust for telling you how to do all of these dirty hacks ;)

FOSDEM 2012

Mobillians by Brian King (CC-BY-NC)

This year’s FOSDEM was a special one for me. It was the first time I attended it as a Mozillian! I had already met quite a few European community members at MozCamp Europe last year but this FOSDEM was a great opportunity to meet even more Mozillians face-to-face. I stayed at the Mozilla DevRoom most of the conference but also spent some time catching up with my fellow GNOME hackers.

Chris and I gave a “State of Firefox Mobile†talk on Sunday. I usually don’t share my slides because they tend to be too short in content to be useful. However, we wrote some speaker notes that give enough information and context on what we talked about. So, here’s the deck alternating between slides and speaker notes—I wish Speaker Deck had proper support for speaker notes…

All in all, I had a great time at FOSDEM this year! PS: The weather during the conference was quite special too—in a painful way!

On vendor prefixes in CSS and vendors implementing them

On Monday at the CSS Working Group, Microsoft, Mozilla and Opera announced that each are considering supporting some -webkit- prefixed CSS properties.

I include here Bruce Lawson's excellent summary:

Lots of developers, despite evidence to the contrary, have assumed that mobile Web = WebKit browsers, because that’s the rendering engine in Android and iThings. Suppose the site was made a while ago and used the experimental, pre-standardised code -webkit-border-radius and didn’t use the cross-browser future-proof method. The real CSS property border-radius has been long been standardised and supported without prefixes in all the major browsers. But the -webkit- prefixed version still lingers on in Safari and Chrome, so that legacy code looks fine in the webkit browsers, but broken in Opera, Firefox and Internet Explorer.

We've been through this fight before. A few years back, Internet Explorer proposed the X-UA-Compatible header, which would mean that IE8 would act like IE7 unless you specifically told it to act like IE8. The proposed solutions back then were similar to what we're seeing today in response to -webkit-* CSS in non-WebKit browsers: developers shouldn't be lazy; developers should do it right; sites should break if they use WebKit-only CSS in order to punish the developer; use this library to help you do it right (LESS for CSS pre-processing on the server side, prefixfree on the client-side); WebKit should stop supporting a prefixed CSS property once it supports the unprefixed version; vendor prefixes are a broken concept and should be abandoned.

None of these approaches will work.

Expecting developers to just Do It Right To Begin Withâ„¢ is a noble goal, but it doesn't work like that. Everyone has deadline pressures; most people are not on the bleeding edge of the web standards community; the tension between "make it work today" and "make it right for the future" is never going to go away, no matter that we wish it would. The way to success is to align the right way to do it with the easiest way to do it; the way to success is to make correctness the path of least resistance. This is what informs the HTML5 "pave the cowpaths" approach, and it's that way for a reason; if correctness requires extra work, then at least some people will be incorrect through lack of time or lack of knowledge.

Breaking websites, by having WebKit deliberately stop supporting a -webkit property once it supports the unprefixed property, is not going to happen. The WebKit team have explicitly stated that they won't do that, for "backwards compatibility reasons". Also, frankly, expecting them to is naive; they should make websites break just in order to teach developers the Right Way To Do Things, when those websites currently work? Remember, it's not developers who are punished by this; it's the users of the sites, because those users get a new phone or a phone OS upgrade and suddenly half the sites they use don't work. This hurts them, and they're who we're doing this for. The WebKit team are looking out for WebKit, but they can't be blamed for that; stuff works for them, after all.

There's an argument that users who find their sites broken will blame the sites, and then the site developers will fix the problem. I disagree. If I decide to try Opera Mobile or Firefox on my phone and half the sites I use don't work, I'll say: oh well, can't move to that, then, and I'll go back to the built-in browser. This is the Microsoft argument: one broken program will prevent an upgrade, and they're right. What we get is de-facto lock-in, just the same as all those businesses which couldn't migrate away from IE6 because of their intranet.

Using a server-side preprocessor or a client-side JS patch to turn some-property into -webkit-some-property, -moz-some-property, -o-some-property, -ms-some-property is a useful tool for developers who know what they're doing but can't be bothered to type it all in. Think about it: if I just use the unprefixed standardised property right now, then eventually (when the browsers all implement it) my site will work! I don't have to do anything to make that happen; I'm out in front and waiting for technology to catch up with me. It does not help the developers who are actually affected here, the ones building sites with only -webkit CSS properties in them, the sites that Bruce calls "legacy code" above. And it's those legacy sites which are compelling Mozilla and Microsoft and Opera to debate supporting that WebKit-only CSS.

So, then, smart-arse, what's the solution, if it's none of those?

Well, obviously, the evangelism efforts should continue. Progress is made. People do learn. It's slow, but we get there in the end. What we're talking about is an interim solution in addition to that.

I think @leaverou's prefixfree JS library has the right idea, it's just backwards. Prefixfree takes proper CSS (an unprefixed property) and turns it into all the vendor-specific prefixed properties, so that you write CSS-of-the-future and the library turns it into CSS-of-today. It's a polyfill. What's wanted here, I think, is something like prefixfree but which takes CSS-of-the-past (-webkit-some-property and turns it into CSS-of-today (-webkit-some-property, -moz-some-property, -o-some-property, -ms-some-property, some-property). This wouldn't be a hard polyfill to build (it's just prefixfree, tweaked), but then of course you have the problem that no-one knows about it. So here's the second part of the proposal: common JS libraries should do this sort of thing by default. Imagine if jQuery fixed this stuff for you. I think, without wishing to sound snobbish, that most reasonably-complex websites include some JS (progressively enhanced, ideally), and most of those use a library. The developers we're talking about (and this is the snobbish part), the people writing legacy WebKit-only code, will have that WebKit-only code automatically patched to work with all other browsers without having to know that it's even happening. The ones who are short of time get that time back; the ones short of knowledge can learn on their own time and are helped to not screw their users in the meantime.

This sort of view is problematic. I'm proposing giving a man a fish, not teaching a man to fish, and that's wrong. I agree. In this instance, given the choice between not educating a developer or not screwing some of his users, I'm choosing the users. I don't know a way to choose both. It's also problematic because I'm suggesting that library developers do all the work, and everyone using that library takes a performance hit even if they don't need to. So, I'm sure there will be other suggestions, and I'd love to hear them. I'd just like to stop hearing all the ones above that don't help the problem get fixed.

GStreamer 0.11 + JHbuild

If you try to test GStreamer 0.11 there’s this nice gst-uninstalled script; somehow that didn’t work for me as soon as I tried to use more non-gst interdependent libraries so I opted to use jhbuild. Luckily that’s quite easy with the stock gnome jhbuild moduleset.

To do that, I created a new .jhbuildrc-gst-0.11 with the following modifications. skip and modules can of course be adjusted to own needs.

moduleset = 'gnome-world-3.4'
modules = [ 'vala', 'libgee', 'gstreamer', 'gst-plugins-good', 'gst-plugins-bad', 'gst-plugins-ugly', 'gst-ffmpeg', 'gssdp', 'gupnp', 'gupnp-av' ]
skip = ['gtk+', 'atk', 'gcr', 'gtk+-2', 'rarian', 'NetworkManager', 'gnutls', 'polkit', 'p11-kit', 'gnutls', 'cantarell-fonts', 'gtk-engines', 'librsvg', 'gnome-themes-standard', 'libgnome-keyring', 'pango', 'expat', 'libgpg-error', 'libgcrypt', 'glib-networking']
os.environ['JHBUILDPS1'] = '[gst-0.11] '
branches = {
    'gstreamer' : '0.11',
    'gst-plugins-base' : '0.11',
    'gst-plugins-good' : '0.11',
    'gst-plugins-bad' : '0.11',
    'gst-plugins-ugly' : '0.11',
    'gst-ffmpeg' : '0.11'
}

February 08, 2012

So You Want to Write a LightDM Greeter…

Matt Fischer wrote a great post about writing a greeter for LightDM.  Runs through an example of a Python greeter and how it works.

Wed 2012/Feb/08

Si la lluvia llega hasta aquí Voy a limitarme a vivir. Mojaré mis alas como el árbol o el ángel o quizás muera de pena. Luis Alberto Spinetta — Canción para los días de la vida

Thank you for everything, Flaco.

Stoq 1.2

We released Stoq 1.2 last week, this release features quite a bit of features:

Calendar application

It’s now possible to list payments, purchase orders and client calls in a graphical view:

 

It might look familiar, it uses the fantastic javascript library fullcalendar. We really wanted to use a normal GtkWidget for the calendar but it would have been a lot more work to rip out half of evolution. If there are any other options that can match fullcalendars functionallity there we’d be open to switching as embedding WebKit, jQuery and fullcalendar in a Gtk+ application is not ideal.

Configurable keyboard shortcuts

This is something that has been requested many times over the years. It makes it easier to remap the keyboard bindings use often to other keys, such as the function keys. There’s still an open task to redo all the existing keybindings that aren’t uniform enough.

Configurable form fields

Some companies does not use all the form fields (fax anyone?) that we show per default and Stoq know has a configuration interface where you can make fields non-mandatory and even hide them if you don’t wish to see them. Perfect for the first steps of localization.

New manual

One of our interns rewrote old docbook manual to mallard, and it looks beatiful and is now well integrated in the application. You can find the online version here. It involved removing a lot of screenshots and text. It’ll be easier to update the manual in the future if there aren’t any screenshots. He also fixed the interface, there are now various help buttons in the application that goes to a help section describing that part.

Localization support

It’s now possible to configure some of the fields that are specific to each region/country. The only thing that made it into this release was company identification number (Brazil: CNPJ, Sweden: Organisationnr, US: Employer Identification Number). But person identification number and list of states has landed in the code repository since the release. We still need someone to step up and start doing the actual localization for this, be the hero of the day and download Stoq and start localizing it!

Boleto Bancário (Bank invoice)

Brazilian banks supports a kind of invoice with a barcodes/numbers, called boleto bancário. It’s semi-standardadized, most of the data is similar, but you need to special case each bank that should be supported. There are two kinds, with and without cobrança (for eventually sending to a collection agency). There are a couple of 100 active banks and about 15 major ones. Stoq currently supports 7: Banco do Brasil, Banco Real, Banco Santander, Banco Bradesco, Caixa Econômica, Banrisul, Banco Itaú. All without cobrança though, support for that will come in a future release.

Call for volunteers

Stoq has initially been targeting the Brazilian market, since that what’s close to the current development team. But there is now longer an excuse for not trying to use it. We can barely handle the legal part of Brazil and we’d need volunteer help to make it possible to use in other countries. We’re very proud of the application so we wouldn’t want to stop you just because you live outside of Brazil!

So, why don’t you grab the code and get started, it’s all python (and a tiny bit of javascript) and shouldn’t be hard to get started.

Don’t be discouraged by the web site and manual is only in Portuguese, we use gettext and rosetta and the code is modular and easy to understand.

We’ll need a lot of work to support localization in different countries such as: company/person formats, states, taxes and other things we don’t know about yet, let us know and we’ll try to find a solution.

Just send me a mail or come in on our new shiny web chat: http://chat.stoq.com.br/ (aka #stoq on freenode)

Lots of excitement for openSUSE in Florida

As promised, I’m blogging periodically to update you all on the progress of our soon-to-be-named openSUSE conference in Florida.

Name it!

With our naming poll closing this Saturday (11-February), the naming poll is getting pretty exciting.   A last minute entry is gaining popularity and it looks like possibly it will be a toss-up between two proposed names before the poll ends.  If you haven’t voted yet, why not?  Vote here.

I wanna join!

On IRC, mails, and directly on our planning wiki page, people are volunteering to be a part of the planning.  On the wiki page, you’ll see we’ve solidifed the types of committees we need and added some good notes to relevant committees.  People have volunteered whether or not they think they can actually make it to the conference.  A good show that just because you may not actually be there, that doesn’t lessen your value within the community.

I’m especially excited to see some good diversity on the program committee.  Itxshell, from Honduras, is joining Alan Clark, Drew Adams and myself and will give us good mileage toward our goal of making this a great bi-lingual conference.  We want to make this a welcoming experience for both English and Spanish speakers, both languages have high presence in the area.

Sponsorship Committee

Many of the committees that have immediate tasks to perform are moving along at a good pace after our kickoff meeting last week.  However, one immediate need is the sponsorship committee.  This is a vital function that needs to be organized in the very near future.  As we have said already, we cannot expect guaranteed funds to cover all our conference expenses and we want to reach out to potential sponsor donors to help fund the conference as well as any possible travel sponsorships.  If you can join the sponsorship committee, everyone would be ever so grateful.  :-)

What else is going on?

As said, our naming poll ends this Saturday.  At that point, we’ll be able to move quickly with setting up our conference web page, promotional posters and flyers to distribute to events, and other things that depend on having a formal name attached to the event.  Andi Silva is already hard at work coming up with designs for our posters and flyers.

Alan Clark has done a nice job of compiling a list of LUGS in the Florida area that can help our organizing efforts.  I think we should expand that to include neighboring states since they’re so close by.

Alexia, the conference manager for SUSECon, will be making a trip sometime in the near future to do ground scouting of the area near the hotel.  We’ll get some good information back about what resources exist in the neighborhood and a better idea for the lay of the land.  This is going to be useful for when we add location information to our website for attendees.

It is my hope that we make a formal public announcement launching the conference by early March.  We’ll tap into the expertise of folks like Mike McCallister and Jos Poortvliet to formalize the press releases, and in conjunction with a site launch and promotional materials printing, we should have a pretty good bang going on in March.

That’s not to say there’s already some excitement going on out there in the world about our conference.  LPI has already jumped in and offered to provide testing services for the LPIC exam.

I’m having the feeling we’re stepping into something good!  :-)

[image]

135 Concurrent Users And Growing

So we're into the migration process to the new GNOME server and are hitting concurrent users loads of around 135. We pushed the thin client updates Monday night and found one tiny regression Tuesday. It was quickly fixed and we re-pushed to that department and then upgraded yet another department last night. So far no major issues in scaling. The upgrade process will conclude on the 23rd, lots more devices to go. Once you get past the initial tuning issues, it's amazing how well this stuff scales.

For those interested, here is top running with the 135 users....very nice.

FOSDEM

The last week has been pretty crazy. Kevin & I flew out of Columbus on Thursday ~1:30pm and arrived in Brussels ~8am Friday morning. We were to fly out of Brussels at 10am, but missed the check-in time by about 10 minutes due to cancelled trains, which led to us having to rebook for another flight which was supposed to leave at 12:10… but due to mechanical issues didn’t actually take off until nearly 2pm. So, we’re now supposed to arrive back in Columbus ~7pm, assuming we don’t miss our connecting flight in Washington DC. Of course, once we get back to Columbus we still have a 2.5-3hr car ride home, and then school and work all day Wednesday. Here’s hoping we make it in time, and survive the next couple days of insanity.

Anyhow, our trip to Brussels & FOSDEM 2012 has been amazing and certainly something that neither of us will soon forget. Its been a crazy whirlwind tour, and I know we’d both have liked it to last a bit longer, but its still been fun. FOSDEM 2012 was my first conference & Kevin’s first time in Europe, and I think we made the best of it. We got to met tons of great people both at FOSDEM & all around Brussels, wander around the city, see some, though certainly not all of the cool stuff in Brussels, and have just had a great time.

At FOSDEM I met dozens of amazing and inspiring people including Karen Sandler, Allan Day, Dave Neary, Seif Lofty & many, many more. After arriving in Brussels on Friday we spent the next 4 hours incredibly lost before finally finding our hotel & taking a much-needed nap. The afternoon was spent seeing Brussels, getting lost again, and finally finding the Delirium Cafe where the FOSDEM Beer Party was held, which was fantastic. We ended up spending most of the night with a group from Barcelona Spain, with whom we went out to eat & then to another bar across from the Manneken Pís before finding our way back to our hotel rather late.

On Saturday, Kevin & I walked to FOSDEM, where I spent most of Saturday manning the GNOME booth in the K-Building, though I did get to attend a couple of sessions, including part of the Legal Issues room fill in and Grey Areas of Software Licensing by Dave Neary , as well as the Cross Desktop group picture & Allan Day’s GNOME 3: Every Detail Matter’s, which hopefully reminded people that the little things really do matter!

That night we went to the GNOME Beer Party at La Becassé which was a blast. Kevin & I spent most of the night chatting with Mario Sánchez Prada of Igalia about pretty much everything – computers, kids, video games, languages, and just life in general. I/we apparently stayed up a bit late though which led to me missing a couple of the talks in the morning which I was hoping to catch, most notably GNOME 3.4 accessible: Status, news, future by Alejandro Piñeiro Iglesias and The Anatomy of a role playing game by Arthur Huillet.

I did manage to make it back to FOSDEM & the GNOME booth in time for the mini-marketing meeting, during which we touched on a wide range of issues. Topics included the redesign of the website, the Annual Report & the overall direction of GNOME in the coming months/years. One of our most important tasks in the coming weeks will be the publication of the annual report, which covers both 2010 and 2011. Another major topic was the re-design of news.gnome.org being done by Christy Eller & Allan Day, including the future of the news site, GNOME Journal, Quarterly reports, the GNOME Foundation site and how to better streamline all of them. One over all theme seemed to be a need for new content, on everything from news articles, how to articles on specific applications, interviews of developers, hackfest reports and pretty much anything else. If you’re interested in writing please let us know!!

After the mini-marketing meeting I spent the rest of the day attending sessions. I started with Seif Lofty & Allan Day’s How to trick a developer into becoming a designer, which was informative while also being humorous and engaging. I next attended a Lightning talk on libre.fm & GNU FM by Michael Sheldon, and caught part of the lighting talk on Netmagis by Jean Benoit, before returning to the Cross-Desktop room.

My last couple hours at FOSDEM were spent in in the Cross-Desktop room attending the last 3 sessions there – WebKitGTK+ status and roadmap to WebKit2 by Mario Sánchez Prada & Philippe Normand, Getting into GNOME by Ekaterina Gerasimova & David King and finally Web applications in GNOME by Xan López.

Getting into GNOME was the most interesting for myself, mostly since I felt that they were speaking to me & many others in my position. There are literally millions of users of free and open source software, but only a thousand actively contribute. Bridging this gap will be the key to the long-term survival and success of free free/open source software.

I know I’ve used Linux & GNOME pretty consistently for the last 10+ years but only found out how to get involved in the last few months. Not because I didn’t want to, but simply because I didn’t know that I could. Up until this past fall I was under the impression, as I suspect many are that there wasn’t a lot to be done outside of coding, which I, and undoubtedly many other users simply don’t know how to do. However as I’ve discovered over the past few months, this simply isn’t true. GNOME (and, I suspect most if not all other free/open source projects) need people to do lots of things which don’t require coding – writing news articles, documentation, making art work, manning booths at conferences (of which there are dozens! There’s probably even one close to you!!), and much more.

So, if you use/love free/open source software, please get involved! Its not hard and every contribution really is appreciated no matter how small. Even hanging out on irc.gnome.org & answering questions in #gnome or #gnome-love when your available, is appreciated. Even if you think ‘oh, I don’t know enough to answer questions…’ you probably do. I know I never thought I’d be able to help people, but I have! Its not hard, and it’s incredibly fulfilling when you do. Alternatively, pick a specific project and see what they need help with. Theres sure to be something that you can do to help!

Overall, I’ve had a great, if slightly crazy week, and I hope to make it to many more conferences in the future. If you haven’t made it to one yet, I highly recommend it!!


notify-osd 0.9.33 released

I just made the 0.9.33 release of NotifyOSD. The main changes are:

Logging to ~/.cache/notify-osd.log is off by default. You have to start it with the environment-variable “LOG†being defined (see LP: #904835). When notify-osd 0.9.33 is running under unity >= 5.4.0 it’ll pick up the average color from the selected desktop-wallpaper, computed and exported by unity, to tint the notifications background. This is to provide more visual consistency with the Dash and HUD (see LP: #810325).

This tinted background looks like this:


[image]

[image]

[image]


Big thanks for patches/branches/contributions go out to:

Fixed bugs/features:

#810325 change background colour to use the same median colour used in the unity dash #827897 should migrate the user gconf keys values to gsettings #856071 accessibility broken due to recent GTK3 changes #904835 keeps on writing to .cache/notify-osd.log and waking up my drive #915389 wakes up for every key/focus event after showing the first bubble

The release page also holds all the needed information about 0.9.33 and a source-tarball.

FOSDEM 2012

FOSDEM is only real with Belgian Waffles FOSDEM in 2012 was an exciting (and naturally, exhaustive) conference again. It's great to have so many relevant people who are all active in the free software world together in one place. It's also a great opportunity to discuss radical new ideas, ideally while experimenting with Belgium beer. Which is what we usually did when we weren't at the conference site.

It was nice to see Jarno and Esko at the conference, too. We even stayed in the same hotel. I hope they enjoyed the Ethiopian lunch as much as I did. And perhaps they're not too angry any more that we lead them to drink Absinthe ;-)

Jon and I gave two talks. Jon's talk (slides) was about Maliit as a project, explaining what Maliit is (and what it is not), combined with a short history lesson about the project. I tried to outline the difficulties of mobile text input in general (slides), picking some use-cases that are known from the desktop world and showing why simply copying the use-cases and their known interaction models does not work very well. I honestly liked Jon's talk more though.

Neither of us two actually managed to visit other talks, even though we wanted to. We had to ask Jarno, Esko and others about what great talks we missed. Apparently there were quite a few :-(

Our Maliit T-Shirts were well received, though we usually only handed them out when someone listened to our Maliit ramblings long enough.

We were asked about accessibility several times, which is currently not within the scope of Maliit but perhaps something to think about in the future.

We also got to talk with the people working on (text) input in Redhat and Intel, mostly in the context of Wayland. There are some interesting opportunities to get things (more) right this time around.

Thanks to our employer, Openismus, for sending us there!

February 07, 2012

Interaction 12, Dublin

I was fortunate enough to spend three days at the IxDA‘s Interaction 12 conference in Dublin’s swanky new Convention Centre this past week. When you’re more used to attending Linux/free/open-source-type gigs, it’s always a bit of an eye-opener to attend a completely different type of conference, and this was no exception… although while the audience at any given talk was awash with iPads and iPhones rather than Linux tablets and Android phones, in many ways the sense of community and desire to drink beer was very much the same :)

Anything in it for for GNOME?

Well, interaction design is interaction design, so most of the talks were applicable in one way or another. A couple struck me as perhaps being of particular interest to our design community, though.

Information Architecture Heuristics

Most of us are familiar with Neilsen and Molich’s 10 usability heuristics, and they’re still quite useful… but they’re also over 20 years old, and computing devices have moved on a lot since then. Abby Covert presented 10 updated heuristics for modern interaction design, presented in her slide deck here.

In some ways they’re not actually not all that surprising, or indeed different from the original 10. But there’s merit in validation, too, and I’ll certainly give them a whirl the next time I’m doing a heuristic evaluation.

Demystifying Design: Fewer Secrets, Greater Impact

Lean UX advocate Jeff Gothelf gave his talk about how to take some of the perceived magic out of UX design, by involving non-designer peers and managers more in the design process, to help reduce the amount of bike-shedding and other detrimental activities that can occur when stakeholders don’t necessarily understand how or why a particular design decision was reached.

I know this is something we all try to do in communities like ours… in some ways it’s one of our defining characteristics. But even still, we often find ourselves open to accusations of doing “design in secret†(a.k.a. “on IRCâ€), so perhaps there are some things we can learn from Jeff’s slide deck.

Communication & Content in Web Software

As a bit of a grammar pedant, I enjoyed this talk by local IxDA stalwart Des Traynor, much of which focused on how microcopy (labels and other snippets of text in your UI) can make or break your website or your application. Of course we already have some awesome documentation guys in GNOME who worry about this sort of stuff, but IMHO we don’t always involve them enough in copywriting the UIs themselves. Des hasn’t put his latest slides up just yet, but there’s a recent version here, along with a short blog post and a video him giving a similar talk in September.

Hacking space exploration and science

Finally, as a bit of an astronomy geek myself, I was surprised and pleased to see a talk about this topic at an interaction design conference. Ariel Waldman is the founder of the Science Hack Day in San Francisco, and spoke about that, Galaxy Zoo and Planet Hunters, among other things. Not too much in her slide deck that’s directly applicable in a GNOME context, I just enjoyed the talk :)

More Extension API breaks/improvements

Since GNOME Shell Extensions launched, we’ve been overwhelmed at the response from the community. You guys are awesome, and I’m constantly impressed at what things you guys are doing with the Shell. I’ve been a bit behind on reviewing extensions and adding requested features to the website (I still need to get started on search and investigating some pretty big bugs), and I apologize. I recently landed a bunch of features to the review system to make it easier for me to review your extensions, such as rewriting the diff system. Hopefully things will go a lot faster now.

When Owen Taylor first suggested the project, we worked out some basic sketches and built an overview for the site, but we didn’t want to change the extension API until we knew what extensions were going to need or want to do. As I’ve said before, I felt that we needed a co-operative live enable/disable system for asthetic reasons: the Shell isn’t the fastest thing at restarting, and a user having to spend ten or fifteen seconds to revert your system to the previous state after deciding that an extension sucks makes for a pretty poor experience. That was the only API break that I inserted into the extension system for 3.2, and it was purely to make sure that your extensions were presented in the best way possible.

Multi-file extensions

The extension system in the shell really wasn’t designed for extensions that had multiple files. The many people that built the system had no idea that this clever hack would be commonplace. While I hate to break API, I’d say it’s for the better. Introducing the “extension objectâ€. Previous to now, we would construct a meta object from your metadata.json, install some random things into it and pass it to you, the extension, through the init method. Over time, we inserted more and more on the metadata object where it was this jumbled bag of things that the extension system added, and things that were in the metadata.json file. While adding a few more keys for the prefs tool below, I finally decided it was worth a redesign.

Here’s an example of the new system in action:

const Gio = imports.gi.Gio;

let extension = imports.misc.extensionUtils.getCurrentExtension();
let convenience = extension.imports.convenience;

Gio.app_info_launch_default_for_uri(extension.dir.get_uri(), global.create_app_launch_context());

let metadata = extension.metadata;
Gio.app_info_launch_default_for_uri(metadata.url, global.create_app_launch_context());

function init() {}
function enable() {}
function disable() {}

Of course, you shouldn’t do these things outside of any user interaction, but a concise, imperfect example is better than one that misses the point by building an StButton, sticking it somewhere on enable(), and then removing it on disable().

You might notice that you don’t get the extension object passed to you – you go out and grab it. If you’re curious as to how we know what extension you are, there’s some clever trickery involved.

What’s on this object? A bunch of stuff that used to be on the metadata object: state, type, dir, path, etc. When we introduce new APIs specifically designed for the ease of extension, this is that place we will put them. metadata is now a pristine and untampered representation of your metadata.json file, and we’re going to keep it that way.

Preferences

One thing that we don’t really have an area for in the current 3.2 API is preferences. Unfortunately, GSettings was incompatible with extensions installed into your home directory (like extensions installed from GNOME Shell Extensions do). We couldn’t get this fixed in time for 3.2, but Ryan Lortie spent a lot of his personal time fixing this, and I thank him graciously. We now have a usable API for settings from extensions. It requires a bit more code, as you can see in gnome-shell-extensions’s convenience.js.

I spend a lot of my time looking at the code for extensions. Extensions have been shipping their own Python or gjs scripts that stick up a GTK+ dialog. Someitimes they built a configuration UI inside the extension with St. Sometimes they installed a .desktop file so that they would show up in the Applications section of the Shell. Sometimes they would insert a button to launch the script, or maybe they made users right-click on their item in the toolbar.

When Owen and I sat down to discuss this, we both decided we need some consistent way for extensions to be configured. Introducing the “GNOME Shell Extension Preferences†tool. It’s a new entry point to your extension – prefs.js. Here’s a simple prefs.js file adding support to the Alternate Tab extension.

... and here's a screenshot!

I didn’t make it too fancy, and it’s entirely possible that Giovanni may want to make a better UI.

Your entry point is a function labeled buildPrefsWidget(), and it should return some sort of GTK+ widget. Whatever you return from there will get inserted into preferences widget.

The combobox is for switching between extensions, and it’s ours. Otherwise, go crazy… the world below is your canvas. As usual, try to make it useful and pretty, but the reviewers on the extensions repo can’t and won’t discriminate against ugly UIs. There is still a policy for this, though: the widgets that you put in the preferences UI have to be related to preferences (I think I’ll allow version strings and other things though), and you should not walk up the GTK+ widget tree beyond your preferences widget (to adjust the combobox or manipulate any UI that is not yours). I’m looking forward to the neat things that you guys do with this!

“But how do I launch it?â€

Oh, right. The tool is marked NoDisplay, so it won’t show up in the Applications menu. This is intentional. I’m currently working on a patch to SweetTooth so you can launch it directly from the website, provided the browser-plugin is installed correctly.

“Something broke, and I don’t think it’s my fault!â€

I’m human. I make mistakes. You can let me know I was or am being a moron by filing a bug for GNOME Shell, or filing a bug for SweetTooth. While I try to respond to everyone’s mail and read all blog comments, I regularly check my task list on these two things, so this is a better system for me.

“How do I try it out?â€

Providing everything goes well, GNOME Shell 3.3.5 should be released tonight, which should have all this new awesomeness. If you want to test with the new browser-plugin stuff, you’ll need to copy the browser plugin from gnome-shell/browser-plugin/.libs/libgnome-shell-browser-plugin.so to ~/.mozilla/plugins, and then restart your browser.

fatrace: report system wide file access events

Part of our efforts to reduce power consumption is to identify processes which keep waking up the disk even when the computer is idle. This already resulted in a few bug reports (and some fixes, too), but we only really just began with this.

Unfortunately there is no really good tool to trace file access events system-wide. powertop claims to, but its output is both very incomplete, and also wrong (e. g. it claims that read accesses are writes). strace gives you everything you do and don’t want to know about what’s going on, but is per-process, and attaching strace to all running and new processes is cumbersome. blktrace is system-wide, but operates at a way too low level for this task: its output has nothing to do any more with files or even inodes, just raw block numbers which are impossible to convert back to an inode and file path.

So I created a little tool called fatrace (“file access traceâ€, not “fat race†:-) ) which uses fanotify, a couple of /proc lookups and some glue to provide this. By default it monitors the whole system, i. e. all mounts (except the virtual ones like /proc, tmpfs, etc.), but you can also tell it to just consider the mount of the current directory. You can write the log into a file (stdout by default), and run it for a specified number of seconds. Optional time stamps and PID filters are also provided.

$ sudo fatrace
rsyslogd(967): W /var/log/auth.log
notify-osd(2264): O /usr/share/pixmaps/weechat.xpm
compiz(2001): R device 8:2 inode 658203
[...]

It shows the process name and pid, the event type (Rread, Write, Open, or Close), and the path. Sometimes its’ not possible to determine a path (usually because it’s a temporary file which already got deleted, and I suspect mmaps as well), in that case it shows the device and inode number; such programs then need closer inspection with strace.

If you run this in gnome-terminal, there is an annoying feedback loop, as gnome-terminal causes a disk access with each output line, which then causes another output line, ad infinitum. To fix this, you can either redirect output to a file (-o /tmp/trace) or ignore the PID of gnome-terminal (-p `pidof gnome-terminal`).

So to investigate which programs are keeping your disk spinning, run something like

  $ sudo fatrace -o /tmp/trace -s 60

and then do nothing until it finishes.

My next task will be to write an integration program which calls fatrace and powertop, and creates a nice little report out of that raw data, sorted by number of accesses and process name, and all that. But it might already help some folks as it is right now.

The code lives in bzr branch lp:fatrace (web view), you can just run make and sudo ./fatrace. I also uploaded a package to Ubuntu Precise, but it still needs to go through the NEW queue. I also made a 0.1 release, so you can just grab the release tarball if you prefer. Have a look at the manpage and --help, it should be pretty self-explanatory.

Accerciser 3.3.5 released!

After a community break, I had some changes to commit to accerciser. So let’s make a special announce for this 3.3.5 release.

One of them, was the macaroon pygobject migration. AFAIK, Orca is the only project which is still using macaroon, so I did this for to keep the Orca performance test alive. Addingly, this release comes with these following changes.

- Fix for bug #659296 – Uncompatibilities with new version of IPython
- Bug 666251: Fix broken tags in gl.po
- Merge branch ‘macaroon-pygi’ into master

Of course, we have new and updated translations:

- Åukasz JernaÅ› (pl)
- Daniel Mustieles (es)
- Praveen Illa (te)
- Jiro Matsuzawa (jp)
- Kjartan Maraas (nb)
- Fran Diéguez (gl)

For this release, I got the help from Julian Taylor and Mario Sánchez to finish the ipython plugin. Also, Joanmarie tested the macaroon-pygi branch, so thanks a lot!!

About the ipython plugin, now it works with ipython-0.11, but still need some additional love, and additional testing …. of course. :]
About the macaroon  pygobject migration, is only related with internals, so the gui and the sequence recorder will not work as expected. We need more time for to get this feature working again. :S

Now, it’s time to work looking forward the gnome 3.4 release, which will have a lot of accessibility improvements.

Enjoy it!


February 06, 2012

And One More Desktop Change

This is really a small change, but thought I'd publish it in case it's useful to anyone else for deployments. Users really, really struggle with three areas: File types, File Size and Folder Locations. I've blogged many times about steps taken to make interaction with files simple and not require file managers. Now that the major technology pieces are finished for us to go live, I can get back into some ideas that have been in my head. I had development something like this for use with our USB sticks on the thin clients, and brought it over to the GNOME desktop. When you double-click on an image now, it allows you to change the size before it's placed into the clipboard. They can shoot in 10megapixel all they want, and with a single click make it "email friendly" for delivery. Having people go into GIMP and reduce and then copy and paste is just way too many steps.

In the shot below the tux picture is double-clicked and the MIME helper bar appears. By selecting "OriginalSize" the image is then pasted into Evolution at 1024x768. This is the default.



However, if if they want to copy it 320x240, all they do is select the ComboBox setting and then put it into the clipboard and python reduces it automatically and then it goes right into Evolution.



It's nice to have some time to make these changes, perhaps it's the calm before the storm :)

PyGObject 3.1.0 released

I am pleased to announce version 3.1.0 of the Python bindings for GObject. This is the first release of the unstable branch, which will eventually result in the stable 3.2.x series.

It is important to point out that this release reverts the change "Convert all strings to utf-8 encoding when retrieving from TreeModel" to restore backwards compatibility. If you are using Python 2 it is recommended to always use the byte-representation of UTF-8 encoded strings (str class) instead of the unicode objects. I'm going to add a section to the Python GTK+ 3 tutorial that will explain this issue and how to deal with it in more detail.

Download

http://download.gnome.org/sources/pygobject/3.1/pygobject-3.1.0.tar.xz

sha256sum: a5b36eff7c4b14f161bc9ba2ae09a03ddb47d9f2c769589b8f389ae3a92cc92e

Highlights

Fixed bug where GObject.property did not respect minimum and maximum values (Sebastian Pölsterl) Handle NULL as a valid case of a char** array (Paolo Borelli) Avoid O(n2) behavior when marshalling lists (Paolo Borelli) Connect to first action of a radio group (Paolo Borelli) Support functions which return GError (Will Thompson) Support GHashTable and GError as callback/closure arguments (Alberto Mardegan) Fix bool(), hash() and __eq__() for GLib.Variant objects (Nirbheek Chauhan) Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even when unused (Sebastian Pölsterl) Properly distinguish between different integer types for properties (Sebastian Pölsterl) Distinguish between GArray and GPtrArray when cleaning up (Sebastian Pölsterl)

Changes

http://download.gnome.org/sources/pygobject/3.1/pygobject-3.1.0.changes

About PyGObject

GObject is a object system used by GTK+, GStreamer and other libraries.

PyGObject provides a convenient wrapper for use in Python programs when
accessing GObject libraries.

Like the GObject library itself PyGObject is licensed under the GNU
LGPL, so is suitable for use in both free software and proprietary
applications. It is already in use in many applications ranging from
small single purpose scripts up to large full featured applications.

PyGObject now dynamically accesses any GObject libraries that uses
GObject Introspection. It replaces the need for separate modules such as
PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once
new functionality is added to gobject library it is instantly available
as a Python API without the need for intermediate Python glue.

git smash

A common thing I end up doing while working on code is to make a series of commits, and  then end up work changes in my working directory which I need to apply to an earlier revision in the history than the top-most one.

One common way to do this is to make a temporary commit with those changes, then use git rebase -i and move that commit below the one I want to amend and choose fixup to have it applied.

But that’s annoying manual work. There’s a more fun way. I have this script in my path as git-smash, it takes a revision as a single argument, e.g. git smash deadbeef:

git reset --keep "$1"
EDITOR=true git commit -a --amend
git checkout HEAD@{2}
git rebase --onto HEAD@{1} HEAD@{2}

This resets the revision history, keeping local changes, back to the given revision. Unfortunately git reset doesn’t have a mode which preserves the index so we then have to use commit -a to capture all of the local changes.

Now we use the reflog (history of revisions in the working tree) to manipulate the tree back to the previous state, first checking out the revision that was two back (before the amended commit and the reset, i.e. where we began). Then we rebase that onto the revision one back (before the checkout, i.e. the amended revision) using the revision that’s now two back (before the checkout and commit, i.e. the original revision we changed).

Mental gymnastics over, this is the same as what we were doing before, just in one handy command.

Git still sucks though.

Long time no see!

The reasons why I have been silent

I have been silent on my blog during the last two years. There are several reasons to this. I went through a serie of emotionally hard to live events during which I had no time left for Ekiga. I guess it happens to all Free Software authors who are developing during their spare time.

Things are getting better now. I have moved into a new house 2 years ago. I also met Claire a few months after I separated from Jonita and I am finally getting prepared to become a father!

I decided to dedicate some spare time to the Ekiga project again. During the time I was not coding, a few people like Eugen Dedu, Julien Puydt, Yannick Defais, and a few others have made their best to keep the project alive.

A few interviews

Two interviews have been published a while ago.

The first interview has been published by Josette on her Josetteorama blog.
The second interview has been published by Billy Toulas on OSArena. It is available both in English and in Greek.

Ekiga 4.00

Work has started on Ekiga 4.00 a few weeks ago. The release should be ready around March when we have done enough testing.

Stay tuned for more information about this exciting new release!

February 05, 2012

Debugging a reference count bug

Last days I have been debugging some weird reports. They all show the same characteristics:

the users are on Ubuntu 11.10 they use bluefish compiled against gtk 3.2 (so not the bluefish package that is provided by Ubuntu, but a newer one) in the Bluefish run the sort function of a GtkTreeModelSort is called after the GtkTreeModelSort should have been finalized and free’ed.

First I used gobject-list.c from http://people.gnome.org/~mortenw/gobject-list.c to see all refs and unrefs on all GtkTreeModelSort objects in Bluefish (luckily there is only 1 used in Bluefish).This showed that there was indeed a GtkTreeModelSort with lots of references left after it should have been finalized. I tried the same thing on Fedora 16 (also gtk-3.2), but it can only be reproduced on Ubuntu 11.10.I tried to get backtraces with gobject-list (which uses libunwind for that) but those backtraces turned out to be useless.

Luckily I received some help on IRC #gtk+ from Company and alex. The first idea was to use systemtap, but since there is no useful kernel for systemtap available for Ubuntu I had to use something more low tech suggested by Company:  I set a breakpoint on gtk_tree_model_sort_new to retrieve the pointer of the GtkTreeModelSort. Once I got that pointer I could set a breakpoint on g_object_ref and g_object_unref with a condition on this pointer. Then I created an automatic backtrace on each breakpoint:

break g_object_ref if object == 0x123123123
commands
bt
c
end

I configured gdb to log everrything to a file, and did a bluefish run. This resulted in a 2.1 Mb logfile with backtraces. This log also showed there were more refs than unrefs.

In this logfile there were a lot of similar backtraces, with an identical function doing a ref and an unref. I wrote a short python script to parse the backtraces and skip all ‘valid pairs’

After this step I had only 15 backtraces left. And from these backtraces the leaking references were easily identified.

Because I was unsure if this is a Ubuntu specific bug or a generic gtk bug the resulting bugreport can be found both at https://bugzilla.gnome.org/show_bug.cgi?id=669376 and at https://bugs.launchpad.net/bugs/926889

Now I am wondering if this approach would work for any reference count leaking problem. I guess the most difficult issue is to find the value of the pointer that is leaking if you have many objects of the same type.. Any suggestions how to do this?


Using git add -p

Currently I’m working on changing the look of the dialogs in Empathy. So here is the problem. One button was not the same size as the other buttons because it had size group. I had to remove the size group to make that button look same as the others. That’s where the problem occured. Removing the size group made more changes to the file because of the version of Glade. Some important rows were also deleted, and some were added.


This how my patch look like:

Here is what I had to do:
* reset the patch
* see that your changes: git status
* type: git add -p and this will take you to this:

(following the instructions you can let the rows to stay changed or remove the rows that you didn’t change)
* when you have only the rows that you need you can make git commit
* format patch: git format-patch HEAD~1
And that’s it. You have what you need.  :)

FOSDEM, part 1

My day started out bright and early, meeting Tom Marble, Richard Fontana and Bradley Kuhn to get breakfast and prepare ourselves for the legal issues and policy devroom. I have to credit Tom, there really was a demand for the room and I thought we had some really interesting conversations. I did slip out throughout the day to get to various GNOME related things, but the devroom was my anchor, which was sometimes difficult when it was stuffed to the gills!

I held two sessions today. One was was an unexpected talk I gave with Bradley about fiscal sponsorship organizations when one of morning speakers let us know that he was stuck on a train and wasn’t going to make it. The second was moderating a panel on software patents, which is always interesting.

The whole track was good, but I have to admit that one of my favorite things was having Harald Welte in the room while Philippe Laurent described the German case law.

I also made it to the cross-desktop room to see a few talks including Dave Neary’s talk on mentorship and Allan Day’s talk on Every Detail Matters. The rest of the day was jam packed with intense conversations and meeting people, which was capped off with a really fun time at the GNOME beer event. I even met a few GNOME hackers I’d not met before. It was also great to hang out with my mentee, Emily Gonyer who not only is experiencing her first conference, but also manned the GNOME booth most of the day!

Must get some sleep to prepare myself for tomorrow’s FOSDEM craziness.

February 04, 2012

It's cold outside

You're gonna catch a cold
From the ice inside your soul
Christina Perri — Jar of Hearts

I bet at four o'clock this morning you weren't in a police station.

Or, at least, if you were I bet you were drunk and I bet it wasn't voluntary.

After the usual Friday night poor showing from my local pub (people who follow me on twitter will be aware that the torture of watching a hundred people think they're affirming their lives by singing Mr Brightside at the top of their voices is a regular part of my balanced weekly diet), I walked home, on a cold and cloudless night. I live about ten minutes walk from town, so the walk's no hardship, except that I was dressed in shirt and no coat and it was, as mentioned, cold.

I need to be clear about this. Ten degrees below zero, Celsius, is seriously chilly when you're standing in it in shirt-sleeves. I'm sure people in actually cold places like Canada or Minneapolis or Refrigeration, North Dakota will be laughing mockingly at this point, but firstly, bugger off, secondly I bet you lot bother to put a coat on when you go out, thirdly it's not two in the morning for you, and fourthly bugger off.

Anyway, I get home and... no door key in my pocket.

You know that feeling when the Fist of Fear grabs your balls when you realise something disastrous has happened? (I don't know what the Fist grabs for women. Feel free to fill me in, or actually maybe not.) Anyway: yeah, that. I went through the usual search-all-pockets-and-then-search-them-all-again routine, just in case a mischievous cold-tolerant leprechaun hid my key from the first search and then put it back, and... no door key. Oh dear.

I'll tell you this; the walk back to the pub again seems a much longer trek. Nowhere near as long as the second return to the house without my key, though, after it turned out no-one had handed it in. And now, what the hell to do, eh? I'm not prescient enough to hide a key in the garden, especially since that's a damned good way to come home one night and find no television where a television used to be, so... locksmith? Do they have 24-hour locksmiths? I can't be the first moron to have done this.

If you're bored today, I have a suggestion for you. Go and find a dude who claims to be a 24-hour locksmith and punch him in his stupid lying face.

Incidentally, how in Jah's name did anyone manage in this situation five years ago without a smartphone, huh?

Not that the internet helps when no-one frigging answers their supposedly-24-hour phone. Also, it turns out that about four of the local 24-hour locksmith companies are actually the same company, who did answer their phone, agreed to send someone, and then after an hour of me standing in the freezing bloody freezing cold confessed that they didn't actually have anyone to send.

It's now half three in the morning, and the shivering is starting to get on my nerves, and I can't get into my house without destroying something like a double-glazed plate glass window which will cost me hundreds of pounds to fix and my hands are shaking enough that I can barely light a cigarette, let alone throw a brick through a door that probably wouldn't break anyway, and I'd like to avoid the police showing up since I have no way of proving that I actually live here except for being able to describe where all the broken bits of skirting-board are, and everywhere is closed and the doors are all locked and it's really spectacularly bone-shudderingly mightily arse-clenchingly ridiculously psychopathically cold, and what to do? I tried sleeping in the shed. Now, cold is not like wind. Being inside a thin empty wooden building does not protect you from it. I was shivering like a jackhammer on a bouncy castle and it was becoming clear, even in my not-very-operational brain state, that lying on the floor at minus ten with only a shirt on could quite possibly lead to me actually freezing to death for real.

Well, if the police came, either I'd get into the house or they'd arrest me, and being arrested would at least make me warm, and right now I'd cut my right hand off if Pol Pot showed up as long as he brought a pair of gloves and some soup.

And then, through the frozen and frosty neurons came the sparkling thought that the police station would be open, wouldn't it?

I actually felt warmer just at the thought. Not much warmer, though.

Anyway, that's how I came to be sitting in the cop shop voluntarily at four am. One lovely copper even made me a cup of tea after I poured out my tale of woe in one long sentence, breaking only for my teeth to chatter together like I was trying to bite through the world.

Police stations: while I appreciate that you're generally there to deal with miscreants and so on, it wouldn't kill you to get rid of two screwed-to-the-ground plastic chairs and put in, say, a chaise longue. After switching my phone to airplane mode I managed to eke out enough battery life that I could sit and read while huddled up against the radiator for five hours until nine o'clock this morning, whereupon I went and fetched the spare key from my estate agent after the longest and coldest and most sleepless night I have ever experienced.

So, tips, for surviving a similar situation.

Have a spare key. Note: I do not have a spare key hidden in my garden, burglars, so don't go looking for it. I do not know how to have a spare key somewhere where you can get at it but thieves cannot; suggestions welcomed. Have a girlfriend so that there's someone to let you back in. Next time you see a policeman, be nice to him.

I think I might have a nap now.

GJS Improvements

Myself, Giovanni Campagna as well as Colin Walters have all been working hard trying to make GJS somewhat of a competitor to PyGObject, being a full introspection stack for the GNOME Desktop Environment. Rather than give you a bunch of history, let me just give you a quick taste. There’s much more to the landing than this, such as implementing your own signals, properties, as well as implementing interfaces, but it will take me a few days to come up with an exciting example that fully showcases the power that you now have.

const Lang = imports.lang;

const Cogl = imports.gi.Cogl;
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;

const MyClutterActor = new Lang.Class({
    Name: 'MyClutterActor',
    Extends: Clutter.Actor,

    vfunc_get_preferred_width: function(actor, forHeight) {
        return [100, 100];
    },

    vfunc_get_preferred_height: function(actor, forWidth) {
        return [100, 100];
    },

    vfunc_paint: function(actor) {
        let alloc = this.get_allocation_box();
        Cogl.set_source_color4ub(255, 0, 0, 255);
        Cogl.rectangle(alloc.x1, alloc.y1, alloc.x2, alloc.y2);
    }
});

const MyClutterEffect = new Lang.Class({
    Name: 'MyClutterEffect',
    Extends: Clutter.DeformEffect,

    vfunc_deform_vertex: function(effect, width, height, vertex) {
        vertex.x += Math.random() * 20 - 10;
        vertex.y += Math.random() * 20 - 10;
    }
});

let actor = new MyClutterActor();
let stage = new Clutter.Stage();
actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_CUBIC, 2000, ['x', 'y'], [200, 200]);
actor.add_effect(new MyClutterEffect());
stage.add_actor(actor);
stage.show_all();

Clutter.main();

In Brussels!

I’ve arrived safely and soundly in Brussels for FOSDEM, despite a weird back injury (I didn’t know you could get those from sneezing…) I’ve had a nice time talking to folks already, even if I’ve gotten a couple of rants about GNOME. There’s been some really great positive discussion too.

I’m excited for the Legal Issues devroom I’m cohosting with Tom, Bradley and Richard and also for the Crossdesktop devroom. I’ll also try to hang around the GNOME booth. Please come and say hi. See you there!

February 03, 2012

An unintended gem about usability


<UU> Somedays, I think why can't we have computers which just work.
<UU> But then I remember that I am a Computer Scientist.
<UU> So, yeah, I guess I understand why.
<Nirbheek> :D

Quite related to GNOME, really.

Zoom H1 firmware update 2.0 adds USB Digital Audio support in Linux

I’m so happy about this added functionality! I want to publicly thank Zoom for such a great free update.

The Zoom H1 makes super high quality recordings, and now also serves as a high quality digital audio mic while connected to a Linux computer.

Performing the Zoom H1 version 1.x to 2.0 upgrade in Linux

In short, this fails.

Something about writing the H1MAIN.bin to the Fat32 file system in Linux causes the very brittle upgrade process to fail. It will notice the file and begin the process, and end with “WRITE ERRORâ€. Thankfully it doesn’t brick the device.

The solution is to:

copy your recordings off the device format the card inside the device: hold the Trash button while turning it on, then confirm the format by pressing the Record button copy the H1MAIN.bin file to the root of the device’s filesystem using a Windows computer (download Zoom H1 System Software Version 2.0 and unpack) initiate the upgrade: turn on the device while holding the Play/Pause button, then confirm the upgrade by pressing the Record button (twice)

Once upgraded, the mic functionality is detected and works automatically in Ubunutu (and presumably other Linux distros), and shows up in PulseAudio as both an Input and an Output. This means you also now have two audio outputs.

It even works in the Luz Spectrum Analyzer. :) Enjoy!


Recent misc likes

Even though some of these tools have been around for years, I have only recently started using them.

* byobu - nicer than plain screen with good defaults, for example key binding for scrolling is like in a regular terminal.
* sbuild - nicer than pbuilder, defaults to overlay directory instead of tarball, hence fast by default, nice colors, build summary. I have heard about it for a long time, but the recent mention during Ubuntu devel week made me curious. It is friendlier now - no need for LVM snapshots. http://wiki.debian.org/mk-sbuild
* syncpackage - which now allows syncing from Debian if you have Ubuntu upload rights. No need to burden the archive team members anymore for every sync or go the roundabout way of getting from Debian and then uploading manually without changes.
* Modern Debian packaging in the form of the 3.0(quilt) source format and the new dh tools. The former allows a cleaner separation between the upstream and distro bits while the latter makes the debian/rules file much shorter and cleaner even than with CDBS, let alone with the classic debhelper way.
* Twitter Bootstrap - mostly unrelated to packaging or command line stuff, but very nice regardless. CSS+Javascript UI elements that for me at least make jQueryUI superfluous, while being promoted as 'oh, just a CSS framework and style guide, not much else'.


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser