GCDS 2009 Query

Dear lazyweb, why is there no iCal for the schedule? Or Google Calendar? Or at least a PDF booklet, or something? I guess this is something I could do myself, but I'm busy/lazy and I figure that someone must have done this already, right? Like previous Guadecs?

Building Moblin Web Browser

I've been meaning to put some documentation together for mozilla-headless and the various related components, but a pretty hectic schedule (both work and personal life) has meant that I've been pretty short on spare time lately. So just to get the ball rolling, the following is a guide on building the Moblin Web Browser. I'll try to turn it into real documentation and stick on moblin.org later.

Some notes

I'm going to assume that you build all of this in $HOME/moblin and that you're ok with mozilla living in /opt/mozilla-headless (trust me, it's for the best). I'm also going to assume that you have a system already setup for building GNOME applications. And that you have Mercurial installed. For those with non-debian systems without sudo setup, replace 'sudo [stuff]' with 'su -c "[stuff]"' (or setup sudo).

Step 1

Checking out the source

cd ~/moblin
git clone git://git.clutter-project.org/clutter
git clone git://git.clutter-project.org/clutter-gtk
git clone git://git.clutter-project.org/clutter-mozembed
git clone git://anongit.freedesktop.org/ccss
git clone git://git.moblin.org/clutter-imcontext
git clone git://git.moblin.org/nbtk
git clone git://git.moblin.org/mozilla-headless-services
git clone git://git.moblin.org/moblin-web-browser
hg clone http://hg.mozilla.org/incubator/offscreen mozilla-headless

You may also need a check-out of libunique; instructions here.

Step 2

Building Clutter

cd ~/moblin/clutter
./autogen
make
sudo make install

cd ~/moblin/clutter-gtk
./autogen
make
sudo make install

cd ~/moblin/clutter-imcontext
./autogen
make
sudo make install

Note that if you want documentation, all three of these accept '--enable-gtk-doc' as a configure parameter. These should all install in /usr/local by default, you should check that this is setup in /etc/ld.so.conf.d, and you may need to run 'sudo ldconfig' after installation.

Step 3

Building Nbtk

cd ~/moblin/ccss
./autogen --without-rsvg --without-soup --disable-ccss-cairo --disable-ccss-gtk --disable-examples
make
sudo make install

cd ~/moblin/nbtk
./autogen
make
sudo make install

Note about documentation still applies. You can get nicer build output from libccss by specifying '--enable-shave' too (used by Clutter and co by default), and if you're a developer, you may also want '--enable-debug'.

Step 4

Building Mozilla

Download this file to your home directory before starting.

cd ~/moblin/mozilla-headless
hg checkout headless
make -f client.mk configure
cd ../mozilla-build
make
sudo mkdir /opt/mozilla-headless
sudo chown $USER:$USER /opt/mozilla-headless
make SKIP_GRE_REGISTRATION=1 install

Now, this is the slightly less straight-forward bit. You'll either need to add a file to /etc/ld.so.conf.d to add '/opt/mozilla-headless/lib/xulrunner-1.9.2a1pre/' and '/opt/mozilla-headless/lib/xulrunner-devel-1.9.2a1pre/' to your default library search path, or you'll need to alter your environment to add them to your $LD_LIBRARY_PATH. I'd recommend the latter, and doing it in your ~/.bashrc, making it easier if something goes wrong.

You'll also need to add '/opt/mozilla-headless/lib/pkgconfig/' to your $PKG_CONFIG_PATH. Again, I'd recommend doing this in your ~/.bashrc. Don't forget to run 'sudo ldconfig' after installation, if necessary.

Step 5

Building ClutterMozEmbed

We're almost there now :) If you've followed all the previous steps correctly, it should all be downhill from here (in a good way).

cd ~/moblin/mozilla-headless-services
./autogen --enable-gnome-proxy
make
sudo make install

cd ~/moblin/clutter-mozembed
./autogen --enable-plugins
make
sudo make install

Again, the only slightly non-standard thing here is that mozilla-headless-services is a dbus daemon and you may need to setup your system for dbus service activation to work from the /usr/local prefix. Most distributions do this by default, but if yours doesn't, have a look in /etc/dbus-1. If you can't get that to work, you can run the daemon manually with '/usr/local/libexec/mhs-service'. Don't forget 'sudo ldconfig'!

Step 6

Building Moblin Web Browser

cd ~/moblin/moblin-web-browser
./autogen
make
sudo make install

You should now just be able to run 'moblin-web-browser', although you may want to run 'moblin-web-browser -w' so that it doesn't launch full-screen (and you may also want to alter the .desktop file to do this by default when launching from the applications menu). I'm plenty aware of bugs, but if you find something that isn't totally obvious, file it over here. Happy surfing :)

Mozilla is actually pretty good guys!

I've not blogged in a while, but now we've released, I figure it's time to break radio silence. Since we were assimi^Wacquired, I've been hard at work on browser bits. I've already blogged about the headless Mozilla back-end and accompanying Clutter library; since then we've created a Mozilla services daemon and we've made the source code for the browser public.

I've been meaning to blog for a while about Mozilla, and the current trend of abandoning it in favour of WebKit. I'm not against WebKit and there are definitely advantages it has over Mozilla in certain situations, but I'd like to highlight some of the great things in Mozilla and why I think we ought to reassess the whole webkit move.

Comparing Mozilla and WebKit is quite a difficult task. They're extremely different. Yes, you can use both to render web pages, but WebKit won't do much more and it's the least that Mozilla can do. This difference affects things at pretty much every level; their structure, their API, their coding styles, their build systems, everything. I'd also say that, in the long run and given its current maturity, this is a huge advantage for Mozilla. Want a download manager? Just use the built in Mozilla download manager. Want to override it? Sure, that's fine, just implement the interface and register it at run-time. This is the same for pretty much any component you can think of that may be required for anything web-related. Use WebKit and you'll have to implement all of these things from scratch, there's no fallback option (generally). On the other hand, the WebKit API to implement these things will probably be a bit nicer. Swings and round-abouts.

And that whole run-time overriding thing? Very cool. Pretty much everything in Mozilla has an interface definition and is accessible and overridable via XPCOM. At runtime. Anything that uses Mozilla has a powerful and accessible extension mechanism, something that I don't believe WebKit can boast. Not only does it have this mechanism, but there's already a huge community of talented developers that are well versed in it.

The last advantage (that I'll mention) that I think Mozilla has over WebKit is a slightly political one; From my experience (and this is purely anecdotal, I don't mean to offend anyone), the Mozilla developer community is a lot more open and a lot more willing to take risks. I think their extensible architecture helps this, but it does seem to be a prevailing mindset amongst Mozilla developers. They really want to see Mozilla succeed in every way, and to encourage its development in all directions. Obviously, I'm sure the powers that be also want to see WebKit succeed, but it's not the innocent, wide-eyed enthusiasm that I'd like to think embodies Mozilla developer spirit. The fact that I've been given a repository hosted upstream at Mozilla.org for our headless backend says something, and the amount of support and encouragement I've received from Mozilla developers has been nothing short of astounding.

So why exactly did we (Gnome) abandon Mozilla? Maybe people thought that contributions to the gtk embedding API (which has some annoying bugs and an API that could really use some love) wouldn't be accepted? From my experience, I think this would be highly unlikely. Why exactly are we creating an entirely new backend and API for a new rendering engine (an API that bears an eery resemblance to gtkmozembed anyway, in a lot of places) when we have a perfectly capable, and in fact more than capable platform, funded by a foundation and accepting of contributions? There are a lot of problems with Mozilla. I do wish they used autotools, for example, and I've often run across a bug in my code that's down to me not having some obscure and highly undiscoverable knowledge... But these problems can be fixed... And are becoming fewer... So what's the deal?

Drabble Contest: A Problem with the Planets

Finally, a meme I can get on with!

All was quiet on a chilly Thursday afternoon,
save for the peaceful hum of hard-disks
and the comforting glow of TFT monitors.
You could say it was a day like any other day...
Quite suddenly, there was a commotion!
"There's a problem with the planets!", screamed a developer,
"Recently, there's been nothing but pointless memes!"
"...and bickering over version control systems!" someone chimed in.
A voice queried, "What can we do to recover from this situation?"
An answer came from the blackness;
"Absolutely nothing, it's gone past the point of no return".
All present lowered their heads in shame.

FOSDEM 2009: The aftermath

This year's FOSDEM was really quite excellent, not least because I was giving a talk this time ;) It was great to put a face to some new names, and to see familiar ones too. I won't go on, but the highlights for me were definitely the Xorg and Mozilla talks (not to say there weren't some great talks in other rooms too, I enjoyed the webkit/ebooks talk, and the gnustep theming talk, to name just a couple). I was also quite impressed the presence and apparent mindshare that KDE 4.2 displayed as well. It's looking a lot nicer than it once did.

For those who were unlucky enough to miss my talk, or for those unlucky enough to have been there (I admit I don't always speak in coherent sentences), I've uploaded the annotated slides. Load it up in OpenOffice and check out the 'Notes' tab to get a small write-up of what I was talking about during each slide (as well as a lot of information I missed out as I rushed through the talk!) In case you didn't already know, the talk was about the headless Mozilla backend I've written, as well as ClutterMozembed.

Thanks to Intel for helping me get there, the guys in Intel OTC UK for being supportive and great people to work with, and to all those who acted as if my talk wasn't a complete shambles; thanks for humouring me! I kid, of course, I think it went pretty well considering it was my first talk outside of university... But yeah, thanks and good night :)

FOSDEM '09

I suppose I should blog about this; I'll be at FOSDEM '09 talking about the headless mozilla backend. It'll be awesome, so don't miss it!

I haven't planned out what I'll be saying yet, but likelihood is it'll be an overview of how to go about writing a simple Mozilla back-end, why this one was written, what a headless back-end allows for and some demonstrations and example code. If you're interested in seeing Mozilla on new platforms, or you want to see Mozilla on Clutter, I'll hopefully make it worth your time :)

Killzone 2

So, this evening I was lucky enough to win a pair of tickets to see and play a preview of the forthcoming Killzone 2, for the PS3. It's really something else. Much like Metal Gear Solid 4 and Gran Turismo 5 Prolog before it, this is one of the few games that you can point at and say "There's evidence that the PS3 is more powerful than the 360". The gritty semi-realism, visceral action and technical wizardy on display here is well beyond any other console first person shooter and for anyone into the genre, this is a definite buy.

The event itself was very nice, I definitely have to get into a few more of these. The people dressed up as soldiers from the game (both sides) were amusing and I certainly got more drunk than I'd usually allow myself to get (free champagne and canopes). What was really nice was that whoever organised the event realise that the game sells itself. On entrance, there's a room full of machines (on an assortment of projectors and big LCD screens) with the game available to play and no one hassling people. After a while to play (a generous amount of time, too), they showed the intro to the game (which was pretty good, although I don't think this will be one you'll play for the story), followed by a showing of Aliens. All of this was in the Vue in Leicester Square, so it was all pretty nice. For those that got there via the Playstation forums, there was free swag (I've not really looked at what there was yet, but it included a poster, a T-shirt and a mug).

Usually when people ask me to recommend a console to get, I give the following advice; if you want something to play with you friends, get a Wii. If you want to play games by yourself, or online, get a 360. If you want to do that and you want a supreme media centre/BluRay player, and you don't mind that the game-playing suffers slightly, get a PS3. This is rapidly beginning to change. As more games developers start building their own engines, games are starting to reach (or even go beyond in the case of a select few) parity on the PS3. It does make you wonder if Epic are in Microsoft's pocket, given how poorly the Unreal Engine performs on the PS3, but meh...

2009 should be an interesting year for the current generation of consoles. It seems Nintendo have given up on releasing good games, developers have started realising how to get games to *really* be the same across the 360 and the PS3 and some real triple-A PS3 exclusives are starting to trickle out. I can't say I'm rooting for anyone, Nintendo are a bunch of European-hating arseholes (also, Reggie 'Wii-sports resort is literally a day on the beach!' Fils-Aime is such a tool), Sony seem to be ok with massively over-pricing everything and Microsoft... Well, 'nuff said really... but it's a good time to be a gamer. Personally, I'd put my money on Sony for 2009 (discounting the PS2 of course, because really, they've already won), but anything can happen.

Mozilla + Clutter

I've not blogged in a fair while, Intel have kept me very busy (and no complaints, it's been great!). It's the end of a tiring day, so cutting straight to the point; I've been working on a headless back-end for mozilla (bug #446591) and an accompanying Clutter library that uses it. I wanted to hold off a little longer and have things a bit more polished, but that's a vicious cycle that could go on for a while, so here's how it is today:


Click to watch

So, what's the point in this? Well, with the headless back-end, you now have the power and compatibility of mozilla in just about anything that lets you go from bitmap data->screen. You could start using it in SDL apps, for example, or, theoretically, without X. If you're a cool cat though, you'll use it in Clutter ;).

Anything special about clutter-mozembed? Yes - Unfortunately, it isn't working yet, but I will have hardware accelerated scrolling, similar to what we have in webkit-clutter. What I do have already is out-of-process rendering. If some page or naughty plug-in brings mozilla down, the interface doesn't need to go down with it. If some slow page or piece of JavaScript slows mozilla down, there's no need for other pages or the interface to slow down too. Think Google Chrome, but a bit more magic.

The most important question, where's the source? Well, the git repositories will be public ASAP (I'll blog again when they are - currently we're having troubles and I've been focusing on coding instead of setting up repositories (or responding to peoples' e-mails asking for the details to setup repositories for me ;)). In the meantime, you can get (a very slightly out-of-date, but only by a day or so) patch from the above linked bug.

Meme(me)

Via blizzard

1. Take a picture of yourself right now.
2. Don't change your clothes, don't fix your hair... Just take a picture.
3. Post that picture with NO editing.
4. Post these instructions with your picture.

libjana fixed up for rapid application development

Just finished fixing up libjana-gtk to work nicely with glade-3. When compiled with --enable-glade, a glade-3 catalog file will be installed and some work-arounds will be enabled in the code that allow the widgets to be used nicely inside glade-3, allowing easy creation of GtkBuilder/libglade xml UI description files.

Also, thanks to Thomas Wood's GSOC student pointing out that they were broken, and Emmanuele Bassi showing me exactly what was broken about them, I've fixed the libjana{-ecal,-gtk} vala bindings. Unfortunately, I've not had the time to test them, but they look correct :)

The plan is to use vala and glade-3/GtkBuilder in Dates2, as I get the time to work on it. Hopefully some other people might start playing with it though, as I really think libjana* lowers the barrier of entry for using PIM data via evolution-data-server in GTK applications. Just look what's possible!:


Click to zoom