Installing and using Ubuntu Feisty Fawn Herd 5

I installed Ubuntu Feisty Fawn Herd 5 yesterday morning on an IBM T43 laptop. As I understand it, Herd 5 is basically the last alpha before the Feisty Fawn beta freeze. I wouldn’t normally bother messing around with an alpha Linux distro, but I had two good reasons for trying it.

First of all, I needed to test something on Linux fast and my friend made off with my FC6 DVD last month. I could either spend half an hour downloading a Ubuntu distro or who knows how long downloading FC6 again.

Secondly, I only really need the distro to compile Firefox and run it so I can take patches for a spin. I don’t need it to work out as something for me to use on a daily basis. That lowers the risk factor significantly, since I can probably live with a fair number of bugs and failures. As I’m excited to see Ubuntu’s progress, I figured it was worth a shot.

I’m glad I tried it because Ubuntu Feisty Fawn Herd 5 is awesome! It installed in about half an hour, with me only having to spend about 30 seconds in the installer. Once I booted into the operating system, I did a system update and pulled down about 550 updated packages. That sounds bad, but it didn’t take long and the update went off without a hitch. Such a big update is to be expected when you’re using an alpha release that is under heavy development. ALL of my hardware worked perfectly without me having to do anything – wired and wireless networking, the display at full resolution, the trackpad, everything. The IBM T43 that I have has some weird hardware and no operating system has ever come close to this level of hardware support – not even a fully updated Windows XP SP2 or a fully updated FC6 (both have terrible hardware support for the T43).

Next task was to get it to build Firefox. Not being an experienced Ubuntu user, I didn’t realize at first that it lacks some basic developer tools by default. Within about 15 minutes I was able to track down all of the packages I needed, they installed without issues, and 30 minutes after that I had built Firefox. Fantastic!

There was one thing that bugged me for a while, until this afternoon. “vi” was behaving strangely, in particular the arrow keys in insert mode would insert characters. Very frustrating. This afternoon I googled around and found out that Ubuntu ships with a mini version of “vi”, and the solution was to install the package “vim-full”. With that solved my Ubuntu Feisty system is a dream all around.

Boot time is great, the interface is nice and refined, everything is snappy and stable, and hardware support is wonderful. In an alpha release! This is how Linux should be.

NPAPI Plugin SDK and Documentation

I have to implement NPAPI drawing models soon, so in preparation I have been updating our MDC Plugin documentation and sorting out our plugin SDK situation.

Our plugin SDK situation isn’t good right now. We have Windows and Linux SDKs from mid-2005 and that is all. The new plugin SDK page at MDC should keep people informed about the situation. I hope to have new SDKs up for all three platforms sometime soon.

My short-term plan is to finish migrating project page information from to MDC, kill off the project page so we stop confusing people, and get new SDKs posted for all platforms. After that, I hope to clean up our sample plugin situation (organize the sample plugins, get them all building on the appropriate platforms), but that might take a little longer. I also want to get a system in place for periodically updating SDKs, perhaps only for major releases at first (which would still be a huge step forward).

A huge thank-you goes out to Eric Shepherd, who I’m pretty sure is responsible for most of the awesome NPAPI plugin docs section on MDC. You can’t imagine how surprised and happy I was today when I saw all of that great information organized nicely in one place!

Don’t be afraid to say you don’t have the data

I recently started using Apple’s Dashboard widget for tracking stock prices. I don’t day trade or anything like that, but every now and then I like to glance at the prices of the stocks I own and see how things are going. Actually, I’m mostly curious about how certain news stories and events affect stock prices.

Events that affect stock prices are happening all the time, and they can cause a stock to go up and down quite a bit during the day. Maybe at 10 AM some broker publishes an upgraded opinion of company XYZ and at 11:30 AM company XYZ drops an unfortunate press release. That could easily cause a big drop in the price between 10 AM and noon. Because of this, it is important to have the price of a stock that reflects its value from some time in the past minute or two if you want to either day trade (not me) or watch for significant events during the day.

Apple’s stock tracking Dashboard widget has a problem with displaying up-to-the-minute information. The problem is that when you bring up Dashboard, the widget displays the last information it downloaded even if that information is very old – and it doesn’t indicate that the information is old. Say I open Dashboard at 10 AM and company XYZ’s stock is at +1.25. If I open Dashboard again at 2 PM, it’ll say the price from 10 AM until it is able to get the new price from Since I’m just glancing at the prices, it has about 3 seconds to make that network connection and pull the data successfully, which it usually can’t pull off in that amount of time (lame in its own right). Occassionally I have to wait 10 seconds to 10 minutes to get an updated price! Now I don’t care that much if it takes some time to get the right price, but I can’t use the widget any more because I never know when I’m supposed to wait for the updated price and when it is right. Half the time I end up going to Yahoo finance to verify the price on the widget anyway, so now I just skip the widget and go straight to Yahoo.

What needs to happen is when Dashboard gets pulled up, the widget should check the last time it pulled data. If it was more than a minute ago, it should display N/A for the prices until it gets new data. Until this happens it is pretty much useless. It might as well only show closing prices from the previous day.

Break it up, bucko

I started landing pieces of my Mac OS X native theme rewrite. Native theming is not turned on for content in Firefox yet, I’ll flip the switch when the majority of it has landed and things are working well.

Originally I had it in my head that I was going to post a monster patch that just *poof* fixed native theming on Mac OS X and turned it all on. Turns out that this is more complicated than I thought it would be and I was ignoring some lessons I’ve learned in the past about monster patches. Now I’m breaking up my big patch into digestable chunks and it is making things much easier.

Native Form Widgets Getting Closer

I’ve been working hard on new native form widgets for Mac OS X. I am pretty far along and thing are looking great, but I’ve run up against some difficult layout problems that are going to take some more time to solve the right way. It is now clear to me why nobody wrote a kick-ass native form widgets implementation for Mac OS X before. It is really hard! The biggest problem so far is that theme support via Mozilla’s nsITheme API is not very good. Our layout code only implements support for nsITheme in the specific places where Windows and maybe GTK need it.

There are a bunch of other issues with form control vertical alignment and popup button rendering that are specific to Mac OS X and fixing those without hacks is going to be tricky, but I think taking the time to do this the right way is definitely the way to go. If we go with the hacks it is just going to cause more pain in the future, and we might never get around to undoing them. That is pretty much the story of Mozilla on Mac OS X up until now, and it is time to change that.

I’m a little burned out on native theme stuff for now, I think I’m going to take a short break and work on some other cocoa widget bugs.

Mozilla Mac OS X Update

Its been a while since I wrote about what I’ve been working on and the status of Mozilla Mac OS X development. I am going to make an effort to do this more often, hopefully at least once a week.

There are basically three major tasks to complete in the Gecko 1.9 timeframe.

The first task is to stabilize Cocoa widgets. We need to make them as good or better than Carbon widgets were. We’re about 80% of the way there, the biggest remaining issues being speed, painting, event handling (focus), and printing. That stuff is just going to require us to sit down and fix bug after bug. Colin Barrett is working on Cocoa printing right now, which is awesome because that is the most broken part of Cocoa widgets by far at this point. It sounds like he is making good progress, I’m excited to get that in shape.

The second item on the list is native form widgets. Right now, Camino uses its own code for native form widgets. That code has served Camino well for a while but really it isn’t written correctly and has a lot of bugs. We want to fix all of that so we can have native form widgets in Firefox 3, and that is what I have been working on for the past two weeks. It is going somewhat slowly because it requires unwinding a lot of CSS hacks that Camino used, uncovering and dealing with layout and nsITheme bugs (David Baron has helped quite a bit here), figuring out how to tame the Mac OS X HITheme API, and dealing with Cairo graphics problems. I’m hoping to have a good patch up within the next couple of weeks. Firefox 3 is going to be purdy on Mac OS X.

The last major work item on our list is to allow NPAPI plugins to render using Quartz instead of Quicktime. Right now we only allow plugins to draw with Quicktime, which is bad for plugin vendors and Mozilla performance (once a window starts using Quickdraw, it is kicked off the Quartz Extreme pipeline). I talked with Apple about a spec for this a while ago, and the result is here. I have a patch for part of that, but I’m not going to be able to sit down and finish it until I’m done with the native form widgets.

That’s pretty much where we’re at. In the future I’ll probably write about more specific issues that I’m working on, feel free to ask questions in the comments.