Firefox Update

So, I've been using Firefox as my default browser for about a week, both at home and at work, and I thought I'd report a follow-up on the experience. So far, it's been completely positive. As I stated earlier, Firefox does indeed rock. I have not had a single crash or had a single site fail to load (the latter happened to me all the time in the most recent incarnations of Safari). Firefox is fast and responsive. My window positions are remembered after quitting the app. Editing blog posts works as it should. And I have become addicted to certain features offered by Firefox that simply don't exist in Safari.

Surprisingly, one of the most addictive and useful features is the ability to mouse-wheel-click on a tab to close it. Safari gives you a little "x" in each tab, which when clicked, closes the tab. Firefox only offers an "x" for the tab you're currently in. So at first glance, there's no apparent way to close other tabs. But mouse-wheel-clicking a tab does the job, and requires far less accuracy than Safari's "x" method. There's a lot of stuff like this in Firefox. Hidden stuff that you thought only existed in Safari, but actually does exist and in many cases is implemented better, in Firefox.

Another feature I love is the ability to rearrange tabs. This is something I don't often need to do. But when I do want to do it, boy is it nice. And, going back to Safari, I really miss this feature.

Another feature I really like, and which I'd swear was promised long ago in Safari, but never implemented and seemingly dropped (apparently in deference to "features" like the inability to properly load multiple pages at one time) is the ability to bookmark a group of tabs. I tend to use tabs to group articles by a particular category I'm researching. Say, NFS. I'll Google NFS, then open each article of interest in a new tab, and start reading, closing the useless articles as I go. What I'm often left with is a group of tabs I'd like to bookmark in a folder called something clever, like "NFS." To do this in Safari, I'd first have go to the bookmarks window, create a folder called "NFS," then go to each tab and bookmark it. In Firefox, I hit "control-shift-d," name my folder, and I'm done.

The page-find feature is another great implementation in Firefox. It works similarly to Safari, in that "command-f" brings up a find dialog, but in Firefox, the dialogue pops up at the bottom of your window, instead of on top of everything. It stays active 'til you're done with it, and includes a great "highlight all" function that will highlight every instance of the term in your browser window. The highlight is especially nice too, as Firefox uses its own, can't-miss-it green for highlighting results on a page. Safari uses the system highlight color, which is often too pale to locate on a busy webpage, no matter what color I use.

My major complaint -- and it's quite minor -- is that Firefox doesn't quite look as nice as Safari. Safari looks a little better. A little more Mac-like. It's true. You can do a lot to improve the appearance of Firefox. I'm using a theme called "GrApple (Eos)" and it looks very nice. I'm also using "fancy widgets" from Empty Spaces which I installed with Firefoxy. And it looks pretty damn good. But Safari just barely edges it out in the appearance category. Just barely. My one other complaint is that the Cocoa Dictionary function (hover over a word and hit "command-control-d" to see a definition straight from OS X's built-in dictionary) doesn't work, since Firefox is a carbon app. But these are minor quibbles and are largely overshadowed by all the great features I gain from using Firefox.

I've loved Safari for a long time. It's an Apple app to its core. And as such, one tends to see a trade-off between simplicity and functionality. That is the Apple way. I guess for me, I've moved beyond what Safari can offer at this point in its development history. Safari is a great browser, especially for users without a lot of specific needs, or who don't, like I do, tend to spend all day surfing the web and using web apps. It's a great beginner's browser, and understanably inspires fierce loyalty in the Mac community. But for those of us who need a more robust browsing experience, the latest version of Firefox* kicks some solid ass. And it's only an alpha.

Until Safari catches up to Firefox's feature list, consider me switched.

*Previous versions of Firefox, for whatever reason, did not hold up so well for me as this latest release.

Tiger Lab Migration Part 9: More Problems and Solutions

Well, when last we visited this issue, we were having problems saving, among other things, Final Cut Pro files. After working long and hard with the Panasas folks, I was confident I'd found a solution. And I had, but the solution has created new problems. I want to kill Apple for Tiger.

To refresh, the original problem was that Final Cut was trying to write files across filesystems, and the OS was choking on this operation. This was happening because our RAID exports its /home volume -- and this is what we mount -- but each user account is also an individual volume. FCP writes to the /home level, and then has to cross filesystems to save the file to the user's home account, itself a seperate volume. Our solution was, rather than mounting all of /home, to mount each user's home account individually. This required a whole bunch of scripting and launchd voodoo to really work the way we wanted, particularly with regards to adding new users. But we got it working, and it fixed the Final Cut problem. I implemented it, tested it, and emailed the community about the fix.

Unfortunately, I recently discovered that using this method causes some new, less ugly, but certainly annoying problems: the sidebar home account link no longer works, causing untold confusion among users who suddenly think their home account no longer exists (as per the alert message that appears when clicking this link); but most alarming, users can no longer open documents from their home accounts. Not only can users not open docs, but root via cron fails to open documents. This is a big problem, as our "Scratch" partition gets deleted every Friday, and the users rely on an alert message to warn them of the oncoming doom. This message no longer launches, and that's a real bummer.

So I was in the middle of drafting an email to the community informing them of the latest bugs and workarounds, when I was struck with extreme embarrassment and shame. How can I continue to expect users to work around these bugs when each week brings a new set? Sure, it's not my fault that Tiger is broken. It's not my fault that the Panasas is set up the way it is. But it is my responsibility to create a user environment that works seamlessly and properly for the user. So I resolved to do everything in my power to implement a solution. I stayed at work on Friday night until 2:30 AM, learning much, but left with no solution in hand.

What I learned on Friday, essentially, is that automount in Tiger is totally fucked. I already knew that NFS in Tiger was fucked in that it can't cross filesystems. But it turns out there have been some major changes to the way automount is handled in the GUI, and thus, for all intents and purposes -- or at least for our intents and purposes -- it is indeed fucked. Hard. The inability to follow sidebar references is a direct result of automount's new Finder behavior: automount mounts in the Finder are now invisible! Unless the path is explicitly called, the user accounts, mounted as they are, are quite invisible, both to the user, and apparently to the Finder's sidebar. I also discovered that the Finder's inability to launch files from the user's home account has something to do with automount, or at least how automount is implemented in the GUI. This behavior only exhibits itself from these invisible NFS mounts; it goes away if we mount the user's home account in /home, as we used to do. And it goes away if we use a different command to mount user homes.

Enter mount_nfs.

The mount_nfs command is used to directly and statically mount NFS exports, and it has its own set of peculiarities. First and foremost, mount_nfs grafts mounts to existing folders, which means that mount_nfs requires a folder named for the user who wants to log in. Secondly, and equally important in our scenario, mount_nfs magically mounts the export in the Finder. Or, rather, shows the mount in the Finder (and this has actually, probably more to do with how the Finder translates mounts requested by nfs_mount). Lastly, since the mounts are static, they remain mounted and appear in the Finder until they are explicitly unmounted. Mounting via mount_nfs is equivalent to mounting nfs exports in the Finder with command-k. It also seems to work, you may notice, completely opposite to automount.

To do what we've been doing -- which is to automount home accounts at boot -- using mount_nfs instead would require us to mount every home account at boot on every machine, and those 200+ mounts would be present in the Finder at all times. This simply would not work. So, mount_nfs at boot: not good. You thinking what I'm thinking?

Enter loginhooks.

To use mount_nfs at boot would be disastrous. What we need in this case is something that will dynamically mount and unmount users' home accounts at login and logout respectively. And that's just what loginhooks and logouthooks do, respectively. Getting loginhooks to work in Tiger was again an exercise in frustration, but this time it was due to my own poor understanding of the technology. There is a great reference on login hooks at Mike Bombich's site, and a decent one at Apple's Knowledge Base as well. Between these two resources, I was finally able to cobble together a solution over the weekend which I think will work.

Briefly, there are three things you need to do to implement loginhooks, and some info you need to know.

The info first:
1) Scripts called by loginhooks run as root (good)
2) They run before login to the GUI takes place, and after authentication (also good)
3) The user requesting login can be represented in your script by the variable $1 (excellent!)

What to do:
1) Write a script to be executed at login, make it executable, put it somewhere accessible
2) Run this command:
sudo defaults write com.apple.loginwindow LoginHook /path/to/loginScript
3) Test the script! This is imperative! You can test it as any user you want by running it thusly:
sudo /path/to/script User

For "User," specify a user who would actually log in, and who is available to the system. "User" here will be interpreted in your script with the $1 variable, just as it will at login. If it works in your test, it should work in practice as a loginhook.

Setting up a logouthook works the same way, except you run the command:
sudo defaults write com.apple.loginwindow LogoutHook /path/to/logoutScript

And, BTW, to ch eck that the loginhook (or logouthook, or both) has been successfully added, you should see your script(s) listed, when running this command:
sudo defaults read com.apple.loginwindow

Finally, to disable, login(logout)hooks run:
sudo defaults delete com.apple.loginwindow LoginHook
and:
sudo defaults write com.apple.loginwindow LogoutHook

So, what I have now are two scripts. The login one creates a folder in /home named for the user who's logging in, and then uses mount_nfs to requset the user's home account from the server and mount it in this folder. The logout one forcibly unmounts the user's home account. And that is all.

I've only tested this at home, but it seems to work brilliantly here, and is fast even over a wireless connection. I will be trying it at work on Monday morning and will post back with my results, success or failure.

Wish me luck.

UPDATE 1:
So far, so good. There were some snags, though. I came in a little early this morning (in hopes of starting before the lab became overrun with students) to implement and test my loginhook plan, only to find the home account server had crashed. So, I had to spend the first hour restarting and troubleshooting the Panasas. By the time I'd finished, the lab was filling up. So I had to do everything piecemeal, and it took a bit longer then I'd hoped. That was snag one.

The next snag was that, after one user logged in, the next user would be locked out of his/her home account. This turned out to be a simple matter of setting permissions (on the /home directory) via the loginhook in a manner in which this did not happen.

There are some advantages and disadvantages to this new mounting method. The greatest benefit is that any changes to the mount method are done via very simple shell scripts, and changes don't require a reboot to take effect. Just change the script and you're done. Another big plus it that, if the home account server goes down, the machines aren't really affected to the extent they once were. If no one's logged in, there's no server access happening, so the machines are fine. Only if someone's logged in is it a problem, but then, that's always a problem. It occurs to me, though, that I may want to add a -hard option to my mount script sometime soon. Another advantage is the fact that, since only individual user accounts are mounted, and not the entire home account server, a command like sudo rm -rf /home can't wipe out the entire server as it could before. The final advantage is that reboots are now much faster, since nothing happens at boot time.

The disadvantages are twofold, and solvable but minor: First, since the entire home account server is never mounted now, users no longer have easy access to each other's home accounts. To access another user's home account, they now must connect to the home account server via the Finder's "Connect to Server..." command (or command-k). Secondly, any user who wants to ssh to one of the other Macs, say, from a laptop, will not have access to his home account since the mount only occurs when logging in to the GUI. These issues are minor, and can be solved by simply mounting the home account server somewhere other than /home, but I think we'll try and live without it for now, as I kind of like not having the whole RAID mounted.

Anyway, no complaints thus far. I'll be convinced this is a go after a week or so without problems. But I'm cautiously optimistic at this point.

UPDATE 2:
Day two, and all's quiet on the Western front, as it were. I'm obsessively monitoring the situation, but it's looking very good at this point. Fingers crossed.

This is Getting Ridiculous

This month Apple has announced an almost completely revised product line, including new software. But still, no Tiger update. Today my Powermac became unable to output sound. On reboot it suffered a kernel panic. I also discovered today, on the heels of the latest wave of product announcements, that my Tiger clients cannot launch documents from our newly set-up NFS home accounts. I am hard-screwed by Tiger, and sick of it. But Apple just keeps cranking out new products. I seriously contemplated downgrading the entire lab to Panther today, but it would be stupid to do so with the hope of a fix in the next update. But where is it?

I'm no longer excited by the new video-enabled iPod. I shall not swoon over dual-core processors. Until Apple fixes their seriously fucked up operating system, I will fail to be impressed with anything they might roll out. They can raise the dead for all I care, I won't be impressed. In fact, I won't even link to their site until this stuff gets fixed, not that anyone cares, but hey, it's a political statement. I guess I feel like if Apple can't even take care of the stuff that's out there, why should we give two shits about the new stuff? Sure it looks pretty; so did Tiger. Question is: Does it work?

Oh yeah, and one other thing: Aperture? $500 bucks? Are you kidding? Lame, lame and lame.

I want my 10.4.3.

UPDATE 1:
AppleInsider has estimated release times for the update for both the first half of September and the first half of October. Dude. October's almost over.

I want my 10.4.3.

UPDATE 2:
Here we go again. I'll believe it when I see it.

I want my 10.4.3.

UPDATE 3:
And again.

I want my 10.4.3.

The Death of Metal

Well, I finally got bored enough and bothered enough to mod my Tiger install to look the way I want. Essentially, I wanted to get rid of brushed metal and go more towards the "Unified" look. There are some utilities and what-not floating around out there that do a really nice job of this. I've been using the excellent UNO, but for my needs, even it took things a bit too far, and in the process created some rather bothersome visual artifacts. I had no idea I was so picky, but apparently I am.

Turns out, if you just want to do what I wanted to do, you need only modify one small but important file, which can be found here:

/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras.rsrc

(This should all be on one line. BTW, anyone know the right way to post long lines?

UPDATE: Got it! At long last! -Jan 11, 2006)

So that's exactly what I did.

This is actually a bit harder than it sounds. A resource file of this kind is not something many applications can read. In fact, the only app I found that could view this file was the recently updated ThemePark. And read it it did. I used ThemePark to modify existing .rsrc files I had. The hard part, really, is that there are so many little tiny resources -- small pictures that make up most of the OSX GUI -- that finding the handful you want can take forever. So comparing and contrasting the original Tiger .rsrc file with the one that comes with UNO took some time and effort. But I was finally able to come up with something close enough to exactly what I want.

Now That's More Like It

(click for larger view)

If you like what you see, well, today's your lucky day. I've decided to share the fruits of my labor. Here, in all its glory, for you to use, is my Modified Extras.rsrc file. You are free to use it as you see fit. Drop me a line if you end up using it or sharing it, and give me a little credit. Send people to the blog. That's all I ask.

Please note:

  • This file goes in the aforementioned path, and should have the aforementioned name (Extras.rsrc).
  • Make a backup of the original Extras.rsrc file.
  • This is an important file. Using my modified version of the file could break your system (seriously).
  • It has only been tested on Mac OSX Tiger 10.4.2.
  • If you're uncertain about whether or not to use this file to modify the appearance of your OS X install, you probably should not attempt to do so.
  • If you need further instructions, you should probably try something less risky like ShapeShifter.
  • I am, needless to say, not responsible for any damage you incur on your system, or the systems of others, from your use of this file.
  • I will provide no support whatsoever.

Feed Readers: I Don't Get It

RSS feed readers are all the rage these days. Safari even now has a feed reader built-in. But most people aren't happy with this. So dedicated feed readers abound. I've tried a few, and I can honestly say, I just don't get it.

Basically, these feed readers -- applications like NewsFire and the ever-popular NetNewsWire -- are browsers for reading nothing but RSS feeds. Essentially, they present a list of feeds to which you've subscribed in one column, a list of articles aggregated as-you-like-them in another, and, finally, the full page of any article you happen to select in a window. Neat, right? I guess.

But what I do is to keep a bookmarks folder with my favorite blogs in Safari. I open that folder in a set of tabs, and I start reading. And that's it. It's that simple. I don't see why I need a feed reader to do this. What's the advantage of having all these feeds in a separate application?

One thing people seem to like is that the feed readers can tell you which articles you've read and which ones you haven't. But I already get this information from the regular web page in Safari. You know how I know whether or not I've read a given article? Simple. I remember. I don't really need an app to tell me this. I'm pretty smart that way. Another feature of the feed readers is that they'll alert you to new content. But I check my blogs daily. I'm already pretty aware when and if there's new content. And I don't need to be constantly pestered about new stuff, or constantly fed information. I'll take my daily dose, thanks. Every ten minutes is too obsessive, even for me, and that's saying a lot.

So these RSS feed readers come across, to me, as either crippled or repurposed browsers. Even the RSS reader in Safari seems pointless, though at least with it, I'm already in my browser of choice and don't have to go switching apps. Ironically, in the dedicated readers, clicking links usually takes me to my browser of choice anyway. So why not just start and finish in the browser? This business of apps opening other apps because they can't really handle everything on their own has always struck me as kind of dumb. Like in Quicktime, for instance: The idea that you can have URL links in Quicktime movies is cool. But it seems to me to work best from within the browser itself. Standalone Quicktime movies that take me to the web -- to a browser -- are stupid and irritating, and that's why no one uses them. (Well, no one but Apple, and that's just cross-marketing.) I mean, I opened Quicktime in the first place to use Quicktime, not to surf the web. Going that direction generally doesn't work: Browsers handle Quicktime content just fine, but Quicktime is a sucky environment within which to surf the web. I feel pretty much the same way about RSS news aggregators: Why use one when you can already get everything done right in the browser?

This, by the way, is why there's such a huge in interest in browsers, why browsers are so important. Browsers are the window to the world wide web, precisely because they're designed to handle any kind of media you can throw at them. Quicktime, iTunes, and in my opinion, news readers are not. All those apps open browsers to get the real work of surfing done. I guess my point is, we don't need these news readers; what we need are better browsers, though frankly, most browsers still kick the crap out of even the finest dedicated news aggregators.

But what I'd really like is for someone to explain this to me. It's quite possible I'm just not getting it. Can someone shed some light on the usefulness of RSS feed readers for me? People seem pretty passionate about these readers. So what's the deal? Am I just being shortsighted? Can anyone explain to me why I would ever want to use one of these things? Or why there's such a craze over them lately? Anyone?

I'd really like to know.