Installing Firefox On the Mac

Alexander Limi, one of the developers of the fine — and my favorite — browser, Firefox, recently issued a challenge that has been heard by many: how to make application installation more sensible for the less technically advanced. What followed — and, to some extent preceded — was an explosion of discussion on the matter.

It really is somewhat amazing that the preferred method for installing a good deal of Mac software — the so-called "Manual Install" — is one that's liable to be confounding to so many users, particularly given that Apple has gone to such great lengths to simplify software installation. And I agree with much of what I've read on at least one point: The problem is the DMG.

"They drag the application to their dock directly.
This creates a link to the file inside the disk image, which means that every time they try starting Firefox, the disk image is unpacked and mounted, and starting of Firefox becomes very slow, which makes it a bad experience."

It's true; I've seen very computer-savvy users constantly launch Firefox directly from a Dock icon that's linked to the item on the disk image. And there are certainly many users to whom you'll never be able to explain exactly what a disk image is, how it works or why it exists. Frankly, as useful as it is to geeks like you and me, it's kind of a crazy concept for anyone who doesn't care about these sorts of things. And I'm of a mind that most users don't and shouldn't.

That said, our options are limited when it comes to installing software. As Limi points out, most apps these days are actually folders (another conceit most users aren't and shouldn't be aware of), and so they must be installed from some sort of container, particularly if they're coming from the Internet. This can be either a ZIP file or, as is generally the way on the Mac, a DMG. Typically, Apple uses a DMG that contains an Installer package for distributing their own software, probably because their stuff is usually not simple drag-and-drop stuff. They've also created a special "internet-enabled" flag for DMGs that, when applied, will be recognized by Safari, which will proceed to open such DMGs and run any installers contained therein. This, at least, gives us a way to accomplish some of Limi's stated goals for the Firefox installer:

  1. Start the Firefox download.
  2. When the download is complete, the disk image will mount automatically (if they were using Safari), and the Firefox installer runs.
  3. The install procedure continues similar to how it happens on Windows.
  4. As the last step of the process, the installer lets you set Firefox as the default browser, and start the application immediately. We have seen users forget that they just installed Firefox if you don’t let them start it at the end of the process, and make that the default choice.

Having some experience with Mac OS X package creation, I decided to see if I could quickly whip something up that met these goals. I believe I have been successful. Here's the installation procedure I've designed:

  1. The user downloads the Firefox Installer from Safari.

  2. Safari Opens the DMG and runs the Installer.

  3. The Installer uses a standard method by default, which requires a minimum of clicks, and installs Firefox in the default location, /Applications.

  4. Upon pressing "Install," the Installer requests authentication.

  5. Before proceeding, the Installer's preflight routine quits Firefox if it is already running (this is not necessary, we do it as a precaution).

  6. The Installer then proceeds with the installation of the app.

  7. When it has finished it will open the containing folder and highlight Firefox.

  8. And then it will launch the app. If this is the first launch, Firefox will ask the user if she wants to set Firefox as the default.

This is the basic install procedure, but some more advanced users will, of course, want to customize the install location of the app. To that end, the installer I've built also contains a "Customize" option.

Clicking this will allow the user to customize the install location of the app by selecting "Other" from the Location pull-down.

And then choosing the location from the resulting menu.

I believe this method offers the best of all possible worlds given the current state of off-the-shelf installation options for Mac OS X. It offers some level of customization for advanced users, while still offering a guided experience for less Mac- or tech-savvy users. And I believe it fulfills most or all of Limi's stated goals for a Firefox installer. There are even numerous things we can do to further customize this guided experience — things like adding graphics and explanatory text, or running additional pre- and post-flight scripts to perform certain behaviors.

And this will work great for most folks who use Safari as well. But for anything beyond this particular scenario — i.e., anyone trying to install apps from browsers other than Safari, which would be anyone who uses the above method, i.e. Firefox users as well as users of any other browsers — we still have a problem. That problem is DMG behavior. The DMG, despite being immensely useful and a perfectly good application and installer container, once downloaded, is easily forgotten. It's behavior and purpose are arcane to most users. They don't know what to do with it and are confused by its presence. And it has nothing to do with anything normal users think of as "Software Installation."

Some developers have rolled their own solutions to some of these problems. But I think the answer really needs to come from Apple in the form of a unified, internet-savvy Installer format. Something that knows where it comes from and what it's supposed to do, and once downloaded, just does it. Something that developers can all use for any kind of installation, even so-called "simple drag-and-drop." Something that just works, dare I say, at least as well as it does on Windows. Preferably better.

Given the level of abstraction of so many concepts in modern operating systems — applications are folders, disk images are files that can represent volumes, Soylent Green is People — I think drag-and-drop installers are bound to be confusing to many users. The guided experience, while a bit of a bummer for very advanced users, should be the preferred method. And I think the best candidate for improving upon that method is ultimately Apple.

One thing that would help the situation immensely, though, is if browser developers made their apps internet-enabled-DMG-aware, like Safari is. This goes a long way towards mitigating the confusion wrought by the ever-confusing, yet — at least at this point in the game — fairly necessary DMG.

Update Verification?

So that's what this is all about!

Update Verification

I grabbed this screen shot a while ago when I updated to iPhone OS 3.1. I do that sometimes. See something that strikes me as odd and get a screen shot of it, just in case.

Today I just happened to stumble upon some info that explains the odd, "...verify the update with Apple," that concludes this message:

"Rather than just throw in new local protections, Apple decided that every restore of the device would be verified as being valid and safe by Apple itself.

To do this, during the restore process, users see 'Verifying restore with Apple...', during which time a challenge/response protocol is used between the iPhone and Apple: a 'partial digest' of the firmware files being used is sent to a server, which can then decide to sign off on the result... or not.

Not only does this allow Apple to keep custom firmwares from getting loaded onto the device, but it also allows them to recall existing firmwares by keeping people from restoring to them in the future. To do this they simply would refuse to ever sign, for example, iPhoneOS 3.0 again."

Fascinating! Check out the full article.

iPhone 3GS Bugaboos

Yeah, my iPhone 3GS has been actin' funny, and I don't know why. I really don't. And as a SysAdmin I find the lack of real troubleshooting tools very frustrating.

About the best I can do here is to report my findings. So here are some of the things my iPhone 3GS has started doing.

Network Confusion

The iPhone seems to get confused when presented with too many network options if one of those options doesn't perform as expected. Case in point: I have an extended WiFi network at home, and the iPhone, of course, always opts to use it when I'm home. Signal strength is usually great here, so the iPhone just chugs along. But recently my wireless had some problems and, though the signal was good in some places, it was spotty in others, and in places it would fail to get on the Internet. Turns out one of the Airport Express remotes was having problems, allowing the phone to reach the Airport, but not necessarily get connected.

When something like this happens the iPhone does not gracefully switch over to 3G. Instead it tries endlessly to use the broken WiFi connection. This in turn quickly wears down the battery, as WiFi access is pretty battery intensive.

Personally, I think it would be great if the phone could be a little smarter than that, and if it can't get Internet on a WiFi connection it can see, pop up an alert and ask you if you want to switch to 3G or Edge.

Instead, the iPhone spends all day killing its own battery on a connection that's busted. We have a term for that in the industry: sucky.

Can't Wake; Heats Up; Shuts Down

On occasion I find myself unable to wake the phone. This often happens if I leave the camera running and put the phone to sleep. My guess is that sleep can hang (just like on the full-sized Mac OS) when there are power hungry processes running. It's not a huge deal, though it does require a force reboot, and it is becoming more and more worrisome. The other day this happened, only this time the phone had gotten very hot. After trying a few times to wake it up in the usual manner, it decided all on its own to reboot. Spooky!

This happened, by the way, soon after I downloaded my first application with push notification capability — Zillow — as did other strangeness.

Needless to say, I've turned off push notifications on the iPhone. I am not convinced they're ready for prime time, frankly.

Push Notifications Notification: This Wasn't Here Before

Application Identity Crisis

Another thing that's been happening since downloading Zillow is that, from time to time, my application icons get switched around. Zillow will have the icon for the iHandy Level, or Wild West Pinball will have the icon for Zillow. The only way to fix this seems to be to delete the confused apps from the phone and then re-sync them from my Mac. Sometimes even that doesn't work. Untold fun!

Iconfusion!

More Compass Confusion

I mentioned my troubles using the compass on the subway, but where the compass really comes in handy for me is just off the subway. Walk out of the terminal, and: which way is north? Right. iPhone!

Only the other day I needed to figure out which way was east. And there was no east. Seriously, I'd spin the compass around but it would never show east. Uh, we need east for this to work.

Battery Recharging

Last night was, perhaps, the oddest symptom I'd had yet. I'd left for a river cruise (yes, a river cruise) with a decent battery charge. Probably 70-80 percent, I'd guess. After an admittedly heavy evening of photo and video shooting, the phone suddenly gave me the "I'm almost out of juice" warning, telling me that the battery was at 20 percent. "It's cool iPhone. I understand. You're tired." And I gave it a rest. At some point, though, I just had to grab one more shot. But after doing so, the iPhone rebooted. When it came back up I checked the battery charge percentage. It read 58%.

As my friend pointed out, batteries cannot spontaneously recharge. Something is clearly wiggy with the battery report on the iPhone.

One Last Shot: Empire State vs Chrysler

Bad Power

Since I've gotten my iPhone 3GS the little plug that comes with the thing, the one that connects the phone to a wall jack, only works intermittently. I'll plug it in and my phone will start charging. I unplug it then replug it and the phone won't even register it's plugged into anything. It's really annoying, but since I have other options — in the form of my old iPhone power brick — and a lack of time, I haven't done anything about it. Plus I'm just not looking forward to the conversation with the Apple Genius:

Me: "Uh, yeah, this plug only works some of the time."

Genius: [Plugs phone in] "Seems like it works fine to me."

Me: "Uh, yeah, I know, but in, like, ten minutes, if you unlpug and replug it, nothing."

Genius: [Unplugs and replugs the phone] "Still seems to work. Maybe there's something wrong with your power."

Me: "Yeah, but this has happened in a variety of buildings."

Genius: "It's not happening here."

Me: "It's intermittent. Give it a few minutes."

Genius: "Uh, sure. Okay. NEXT!"

Power Adaptor (Apple)

Conclusion

So what do I think about all this? Well, I think that either the iPhone 3GS or the iPhone OS 3.0 has some power issues, and some sleep issues. I think that the power adaptor included with the iPhone 3GS is crap, and that push notification is very power-hungry, and possibly very flaky when in the wrong hands. I also think that the Zillow application may just be the wrong hands (though it's a pretty cool app, granted). I have just de-installed Zillow and it seems to help with my icon problems at least. Hopefully it will add some much-needed stability to the phone.

Thank heaven I didn't have to remove pinball, though. I'm not sure I could have lived without pinball.

In any case, am I still happy with my iPhone 3GS? Yes, absolutely. But I think I'm getting ready for some bug fixes a la the iPhone OS 3.1 update.

Firefox 3.5 Oddities

I've come across some strange new behaviors in Firefox 3.5. Some, I'm sure, are just the result of bugs or using the beta version for so long, others are likely features. But they're all interesting. So in the interest of sharing I give you these Firefox 3.5 oddities.

Font Request

At some point I must've gone to a site that wanted to use some specific fonts, and Firefox now, apparently, has a method for checking a local system for said fonts and using them if they're installed. When this happens, we see this alert:

Font Request

Pretty cool! But maybe a little scary too. I declined until I can read up on this feature. I have no idea what will happen if I allow this, nor who is making the request. Security risk? Anyone?

UPDATE: This happens in Safari too. The site is UPS's United States English section. Oddly, this only seems to happen on some of my computers. Hmmm... This needs investigating...

UPDATE 2: As reader Jay points out, this is likely a function of Font Book's Auto Activation feature. Indeed, unchecking "Automatic font activation" on my home computer does prevent the alert from occurring.

Font Book Preferences

But weirdness abounds. For one, despite the fact that I do not have "Ask me before activating" checked, I am still prompted in Firefox and Safari. In fact, toggling the "Ask me before activating" setting seems to have no effect whatsoever on the appearance of this dialog box. Weirder still, even after installing (but not activating) the Taipei font on my work computer, which should trigger the alert, I can't make it happen on that system. Nothing I do on my work machine causes the prompt.

Borken Bookmarks

Using Firefox 3.5, for the first in I don't know how long, I was struck with the "Firefox In Use" bug. This is the bug where you try to open Firefox and it tells you that there's already a copy running. We used to get this all the time in my old lab, which was very multi-user. I believe my instance was caused by some Fast User Switching on my part. Eventually I got her running, but wound up getting this rather odd alert:

Bookmark System Borken

I'm not sure what the ultimate fix for this was. I believe, after removing the problem ".parentlock" file, a logout and re-login were all that was required. Possibly a reboot. I certainly didn't need to delete any of my Places database files, which was a relief. I did notice a bunch of places.sqlite.corrupt files in my Firefox profile. These I deleted these as they were taking up tons of space — about 4 gigs if memory serves. Weirdness.

Session Embarrassment

My home network recently lost connectivity, and while I was troubleshooting it I, of course, restarted Firefox. But upon reopening, Firefox was, for obvious reasons, unable to recover certain aspects — by which I mean all my windows and tabs — of my session. This resulted in the following, rather detailed and delightful, alert:

It's Because the Network is Down, Silly

Of course there was no "recently opened web page" causing the problem. It was just my lack of connectivity. Might be nice of Firefox to at least remind me of the possibility. Still, this alert has some real class.

So there you have it. Proof that there are some real, live, genuine under-the-hood changes going on in the new Firefox 3.5.

Fun stuff.

A Lack of Focus

I've had an ongoing beef with Leopard since it's inception. The problem is difficult to describe, but I've had a lot more experience with it since the last time I wrote about it, and I think I now have a better idea of what's going on. So I wanted to revisit the issue as we're near the eve of the release of Snow Leopard, and as I feel better equipped to talk about it. Also because it drives me fairly batty.

The problem can best be described like this: An action taken by an application that is in the background can, under certain conditions, cause that application's window(s) to come to the foreground, covering the application that is currently active. Perhaps an example is in order:

  1. I launch Safari.
  2. Before Safari loads completely, I immediately command-tab to the Finder which has a window open.
  3. When Safari finishes loading, the Safari window covers the Finder window.

Finder Obscured: This Shouldn't Be Possible

To rectify this rather odd state of affairs, a quick command-tab to Safari and then back to the Finder does the trick. Not a huge deal most of the time, sure. But let me cite some examples where it becomes a slightly bigger deal. Here's a similar scenario, but now I'm working in TextEdit:

  1. I'm typing in TextEdit.
  2. I launch Safari.
  3. Before it completely loads, I command-tab back to TextEdit and continue typing.
  4. Suddenly, Safari finishes loading and obscures my TextEdit document window; I can no longer see what I'm typing.
  5. To continue working in TextEdit I must command-tab twice as per the previous example.
  6. Moreover, by all appearances but the menubar, Safari is now the active application, which can trick me into thinking I can start typing in Safari. But when I do this I type something — the wrong thing — into my TextEdit document.
  7. And what if I type something like command-a (Select All) and then delete? Now I've just deleted the contents of my TextEdit file — a file I can't even see.

TextEdit Obscured but Active: Where Am I Typing?

That's a potentially destructive scenario I've just described, and I'd pretty much swear that something like that has happened to me in the past, though I admit I did not document it and the circumstances were probably somewhat different.

Beyond the slightly irksome and the potentially destructive, here's one more exceptionally annoying scenario that I encounter on a daily basis:

  1. I log in to my Mac.
  2. Login items begin to launch.
  3. I open a Finder window and begin to manage files.
  4. As login applications finish loading completely, they steal focus from the Finder.
  5. This makes me unable to work on my Mac until all login items have finished loading completely.

I originally thought this was only happening on my slower hardware, but it happens on every computer I use: My old Powerbook, my work G5 and my 8-core Intel home workstation.

As I've said in the past, this is something I would describe as a bug. Background applications should never obscure active applications unless explicitly requested to do so (like when you bring forward a window from another application, which both activates that application but also leaves all windows but the requested one in the distant background). This is my major complaint with Leopard with which I am otherwise very happy. But it's a big complaint. It's a problem that affects me every day, and all day long. It's a huge usability gaffe in my book, and I'm amazed Apple hasn't addressed it already.

For a quality-obsessed company like Apple and an incredibly usable OS like Mac OS X, this lack of focus seems like a huge oversight. And for Apple's detail-obsessed fans this seems like something that would bother a lot of people. But I've only found one lone short thread on the matter in Apple's discussion forums, and one other thread on a very similar (possibly the same) problem. But no answers.

The good news is that Snow Leopard is right around the corner, and Snow Leopard is all about making improvements to the existing system. Snow Leopard is a refinement release. It's all about the details. So I sincerely hope — and if anyone out there can speak to this, please do get in touch — that Leopard's lack of focus is addressed. That would be most excellent.