peteg's blog - hacking - mac

The Mac OS X 10.4.11 Upgrade Killed My MacBook.

/hacking/mac | Link

That's a first, a Mac OS X update that screwed things up so badly the MacBook ceased to function. Oh well, I now know where an Apple store is in Hồ Chí Minh City; I went to:

Thuan My Co. Ltd - Apple Authorised Reseller
98 Nguyễn Công Trứ, District 1, Hồ Chí Minh City.
Tel: 84 8 8218936, 8218937
Fax: 84 8 8218937
Email: thuanmy-sales@hcm.fpt.vn

and tried to buy a copy, nay a licence, of Leopard. I'll spare you that story. The "update" function failed to work any magic (or didn't like the cafés I went to), but the "archive and install" thing did the trick. I get the impression that some database in my old 10.4 installation got trashed.

Here are some fix-ups for Leopard from around the net (sorry for the lack of attribution). Let's fix the Dock (make it look more like Tiger's):


defaults write com.apple.dock no-glass -boolean YES
killall Dock

and the transparent menubar (cut and paste this line, then — eek! — reboot):


sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0.63

Time machine claims to have done something but I haven't tried to use it yet. Spaces is clunkier than I'd expect; using an app that sprays windows around like Finder and expecting some kind of mid-90s "raise" functionality is apparently asking too much. The wifi widget on the menubar finally works like what every user of open networks wants it to. Worth the money? Probably not, but heh, anything to get the MacBook back on its feet. That's the last time I travel without a Mac OS X DVD.

Die, X11, die...

/hacking/mac | Link

This whole Unicode fiasco has finally killed X11 as a viable option for me. I wouldn't have thought it was so very hard to provide a complete set of easily-usable Unicode fonts, but there it is.

So, on André's advice, I've switched to:

  • Aquamacs, GNU Emacs with a shiny-happy Mac OS X face. Apart from a lot of minor irritations that come with losing about a decade's worth of XEmacs configuration, it seems quite slick. I tried Carbon XEmacs but it doesn't support Unicode out of the box, and I refuse to spend (more) hours fiddling with it.

  • Terminator, an xterm-alike written in Java, is possibly the best thing ever to run on the JVM.

  • A new bash from MacPorts that speaks Unicode better than the crusty old one that comes with Mac OS X 10.4.x.

Of course I'll still need X11 for sundry old-school things like Isabelle, but there the pain is much less.

So, why Aquamacs rather than a fancy closed-source editor? Well, TextMate crashed on me after about twenty minutes of use — I tried to open a file while saving-as another one, and was madly switching programs trying to navigate the directory tree — and so I recall the cardinal rule of editors: anything less than twenty years old hasn't been tested enough. Whether the (relatively shallow) differences that Aquamacs has to GNU Emacs matter is something I will soon discover.

iPhoto Script Export

/hacking/mac | Link

This thing is magic: one can readily write a little script to (in my case) copy images from iPhoto into a Blosxom-friendly location, and output the requisite tags.

Accessing the Mac OS X paste buffer from the command line.

/hacking/mac | Link
If you have ever wanted to ship data to or from your X11 environment, check out pbcopy and pbpaste. Now, if only X had a sane cut-and-paste model, we'd be home...

FireFox 1.5.0.11 Mac-optimised builds.

/hacking/mac | Link
I'm not a huge fan of the new FireFox (v2.x) for reasons that slip my mind now. Fortunately a kind soul is still cranking out optimised builds for the Mac, sans fancy widgets.

André on Mac OS X essentials.

/hacking/mac | Link
André's been procrastinating about something, and so we all benefit from his list of tried-and-true Mac apps. Hmm... XEmacs-style Meta-/ for Cocoa apps? It's all my Christmases come at once.

iPod Shuffle Gripes

/hacking/mac | Link
OK, I've owned the damn thing for about a month, time to put the boot in. :-) What I like:
  • Unplugging the headphones makes it pause. Perhaps all iPods do this, but my iRiver didn't.
  • The control is much better designed than my old iRiver.
What I'd like:
  • Some audible warning that it's out of juice. The little all-purpose LED glows red, I think, and that's that.
  • A way to delete songs on the player itself, so I can fill it up with random crap and on-the-spot nuke the annoying stuff, rather than having to tediously go through it afterwards in iTunes at home.
What I don't like:
  • The dinky dock. My old iRiver had a standard mini-USB port, which happened to be the same as my Canon PowerShot A75. One cable was all I needed. Moreover I have no way to recharge it without having the iBook plugged in and running — there's no juice on the USB bus when it's suspended.
Ars Technica killed theirs by running a car over it. This program may yet liberate me from iTunes inanity.

Powering the iBook from the car.

/hacking/mac | Link

I trudged all over Sydney CBD today looking for a new pair of Docs and something that would let me recharge the iBook from the car. It seems the old Docs shop on Pitt St Mall has folded, and the joint down George St that for years proudly advertised cut-price Docs has gone for the factory- (China-) direct brand instead. I'd forgotten what a hassle it is shopping on the street.

Anyway, to cut a long ramble short, I ended up buying a "Powertech Plus Cat. MP-3463 3.5 Amp Universal Step-up DC/DC Converter for Notebook Computer" from Jaycar on York St for $40. The sealed-in cardboard says it was made in China and is distributed by Electus Distribution, and I can guarantee you that the cardboard was printed there too. I can't find it in either of their catalogues. There is also a 6 Amp version for those who have something hefty.

It works, with one small wrinkle: the iBook-sized plug adaptor is wired backwards! Fortunately the iBook is up to that game, simply ignoring a reverse-polarity 24 volts. The solution is to wedge the plug adaptor onto the cable backwards. For the curious these Italians have the details, or you can try to figure out what Apple is on about.

/hacking/mac | Link
André pointed out Terminator to me, a cross-platform terminal emulator written in Java. It sounds promising; the only things tying me to X.org are XEmacs, a DVI viewer and xterm.

Easing into the 21st Century.

/hacking/mac | Link
Met up with André in Newtown for a coffee and some lunch, and being the unpaid ambassador for Apple that he is, we ended up in the Apple store on Broadway and I parted with $119 for an iPod Shuffle, a replacement for my venerable 256Mb iRiver iFP-390T I bought in Boston at the end of 2003. I can't see why it needs an on/off switch.