« November 2007 | Main | January 2008 »

December 19, 2007

Some thoughts on Leopard after a couple of days

After the debacle that was Monday, I've had a chance to sit down and actually use Leopard a bit instead of cursing it roundly from all corners, and overall, I'm still pretty impressed. I'd heard it was chock full of incremental improvements, and felt more polished than previous releases of OS X, so I was eager to give it a try, and the upgrade on the Mini went fairly smoothly, so I went ahead and took the plunge on the MacBook.

I've been using OS X since the first public beta, back when it was simply too slooow, because the idea of a beautiful Unix system on my lovely Pismo laptop was too much to pass up. I'd originally set the Pismo up to triple-boot MacOS 9, OS X beta, and Yellow Dog Linux, but I found after a few weeks that I never wanted to boot into Linux, and while MacOS 9 felt insanely fast after a few days in OS X beta, I missed the Terminal too much to go back into 9 very often. I'm that kind of geek - I generally type what I want the box to do.

So, with all that in mind, I figured I'd review some of the ways in which I'd customized my OS X install in previous releases, and how Leopard makes some of those customizations obsolete, some less useful, how it makes up for it, how it fails, and so forth.

I've used DragThing for years as a Dock supplement (since even before there was a "Dock"), and still find it useful if only to allow arbitrary keyboard shortcuts to launch ssh sessions to specific remote hosts, or to launch applications like certain browsers for testing or simply in order to have a browser without a history and with Javascript and Java disabled, etc. I'll probably keep DragThing, but at some point next year will likely ditch it for Quicksilver, if I can get over the insanity of it all. Oddly, for someone who is keyboard driven, I've never quite been able to like Quicksilver, but I saw this video a few weeks ago and it really impressed me into trying it again.

Stacks strikes me as the sort of useless UI enhancement that I will never, ever use. But I hardly ever use files in the traditional MacOS sense of "icons on a desktop", I read my mail in mutt on the remote server via Terminal window, etc.

I have loved virtual desktops since the old Open Look Virtual Window Manager days, and so I shelled out some cash for CodeTek Virtual Desktop Pro when it became clear that I needed more than one desktop; I'd used other products for MacOS 9 and older, before that, though none of their names stick with me (maybe VirtualDesktop? heh).

Spaces obsoletes CVDP completely, with the caveat that it'd be nice to be able to name your Spaces, and the jarring default "slide" transition is still just that: extremely jarring to me. But hey, it's just a pager. For the most part, I want it to be invisible, and it succeeds on that count. One place where it fails is if I am in a Terminal on one Space and a form in Firefox in another, I can't switch between them so as to copy and paste without losing focus in the form field in Firefox. That's just stupid. I want to switch between applications, not places, I just want the applications to live in those different places so they're not distracting me.

I don't know why, but Firefox still hasn't figured out that when I copy and paste a URL from a Terminal or other plain text context and it wraps, that removing the embedded newline and pasting the result is the Right Thing to Do. So, I end up still using Safari for most browsing, and Firefox for some jobs. I don't know if this is new or not, but I just noticed you can cmd-shift-arrow between Safari tabs, which is pretty cool. I just hope the virtual memory management is better in Leopard; under Tiger I eventually had to reboot every couple days because Safari uses^Wleaks memory like an Alzheimer's patient and things got sluggish when the VM crept up past 1GB, and downright sinfully slow when it broached 2GB - and this was with mods to the paging setup, so it didn't simply double the size of the new swapfiles, etc. So, I'm hopeful that Leopard is smarter about that.

I spend most of my day in Terminal, with a dozen windows open, and mostly the same configuration (three or four logged into our main server, one reading mail, the others open to various filter-related directories; one open to each of my DNSBL nameservers; one open to the occasional client server or our fileserver or firewall, etc), so Window Groups are a nice thing to have, as is the new Settings editor. I still find it slightly confusing, but I'm learning. The ability to specify keyboard shortcuts to Window Groups (now lacking, AFAIK) is a necessity, though, frankly. I hate having to use a mouse to open a few windows I'm just going to type into. Oh, and if I open three windows in a specific order, then save the workspace as a Window Group, by God, I ought to be able to use cmd-1 to go to the FIRST WINDOW, etc. Apparently, this is too much to ask for.

I'd recently discovered and fallen in love with Menufela and MegaZoomer, and had come to love the minimalism of working in a fully expanded Terminal window with no menu bar to distract, and I still have that in Leopard. No issues that I've seen, though I'm still running some apps with menus; still working on figuring out which ones I like having a menu with and which I like in minimalist mode.

I'd earlier hacked my battery and airport menubar images, but the setup has apparently changed under Leopard, which I dislike. I'll probably get around to fixing that at some point.

I make extensive use of Growl, MenuMeters, and SideNote; of these only the last is broken under Leopard, as Spaces screws with the "edge of the screen" paradigm. I'm sure I'll figure out how to make it stick to the side of all my windows eventually, though simply specifying "Every Space" in the per-app Spaces config doesn't seem to be enough.

I've already mentioned the insanity of screwing with the default behavior of decades-old Unix tools and how to fix it; I won't relive that nightmare again (shudder). Aside from that, there have been a few unpleasant or awkward surprises for someone who spends as much time in emacs as he does in a browser (often more). The default emacs in Leopard is 22.1.1, under Tiger it was 21.2.1 (IIRC); behavior in some modes has changed slightly, and others have become barely usable (e.g., cvs-mode doesn't let me check a file in using c-q anymore, it demands I use c-x vv, which is annoying; sendmail-mode simply FAILs to let me insert literal TABs, for chrissakes, which is its SOLE PURPOSE). So, there's some change that needs to happen there, but that's not Leopard's fault, and in a pinch I can use vim, I suppose. I used to be able to cmd-double-click on a URL in Terminal, and it'd take me to the site in Safari; this is slightly broken in that if I select the URL and option-click I get a contextual menu with various search options (in Spotlight, in Google, etc.), but it's cool that as long as nothing is selected option-click on a URL gives me a relatively smart "Open URL" option.

I apparently have to reinstall Parallels, but haven't gotten around to that yet, so nothing to report aside from the fact that I need to reinstall.

I'm running Time Machine, which (along with Window Groups in Terminal) was my primary reason for upgrading to Leopard; it seems to Just Work. More to report on that front after a catastrophic loss of data, I suppose. It seems absurdly simple, almost too simple, but it has to be easier than restoring from Retrospect or CarbonCopy, I suppose.

Oh, and just to round out the "fair and balanced frothing Mac/Unix fanboy" perspective, I should mention that when I upgraded my Mini at the house it couldn't recognize my wireless keyboard and mouse at first (changing batteries helped). So that was kind of annoying, but might have just been because my mouse needed stronger batts in order to be "discovered". Other than that, though, the Mini upgrade was uneventful.

So, all in all, a positive upgrade with some bumps (some ridiculously major, some minor).

UPDATE: Another slightly annoying thing: used to be when I used tab completion on a path containing a symbolic link to a directory, the trailing slash was automatically added. Now it's not, I have to hit tab twice. Minor, but when you use that as much as I do, it adds up.

December 17, 2007

Leopard gotcha - COMMAND_MODE="legacy"

So, I recently upgraded my MacBook to Leopard. Smooth upgrade, very few problems, and one absolutely mind-numbingly stupid "compatibility" issue that has caused me to waste an entire day, reduced to a quivering pile of helpless, angry muscle and bone, because the immediate result was that I could not compile anything at all.

I use bash as my default shell, and have since OS X Beta days, and have built out a number of libraries, customized perl, and so forth, to support my work on enemieslist. Most of these use GNU autoconf, to enable cross-platform portability and simple compilation/installation. I had done an "archive and install" upgrade, which naturally - and as expected - means I needed to install new versions of certain custom libraries, perl modules, and so forth.

Unfortunately, the upshot was that when I went to compile fresh versions for this new OS, I kept getting strange errors from GNU configure. You know, the toolset that most open source projects are written in, whose sole purpose is to work around slight (and sometimes not so slight) differences between the various *nix platforms? Yeah, well it wasn't working. At all. Just kept bailing at the stage where it tried to create libtool.

configure: creating libtool
configure: error: invalid tag name: CXX

It ostensibly seemed like a problem with libtool, or maybe sed, but it turned out to be a problem with a change in the behavior of "echo", one of those hoary old Unix programs that probably hasn't changed much at all in thirty years or more. More to the point, it's a change in order to comply with the Single Unix Specification.

It used to be that "echo -en" would suppress the addition of a newline, and enable the detection of certain special character sequences (e.g., for whitespace and other "unprintable" characters). And it's still that way in the echo built into Bash. But the echo distributed with Leopard's /bin/sh apparently just prints "-en" - breaking every piece of software that relies on GNU autoconf to compile and assumes that nobody would screw around with /bin/sh.

I found this discussion of the issue on macosxhints, and installed the bash from MacPorts, changed my shell and rebooted just to be sure; sadly, I forgot that you also have to add the shell to /etc/shells first, or you can't run a Terminal or any program that requires a shell. Oops. Chalk that one up to stupid. Fortunately, TextMate came to the rescue and I was back in business.

Or so I thought. It seems that changing my default shell didn't make any difference at all. The only thing that worked was setting COMMAND_MODE="legacy" in my /etc/bashrc, as discussed here.

Thanks, Apple. I really and truly needed to waste an entire day FAILING to reinstall all of my scripts and custom libraries so that I could WORK, over a one-line fix in an rc file.