macosx

iTunes update causes Butler to hang

After applying this weeks iTunes/Quicktime update, Butler would hang when launched. Deleting prefs and moving config files didn't help. I use Butler so extensively that losing its features is a big deal - certainly a big enough deal that I was wishing I could rollback the last update. Luckily there's an easy solution, but it took me a few minutes to figure out.

Mac OS X 10.4.9 DMG woes

The 10.4.9 update of Mac OS X has a "feature" where it will automatically fsck your .dmg's when you mount them, and if the fsck fails it will give the error "The disk image you are opening may be damaged and could damage your system."

GCC tip: get a list of built-in macros

Apple's QA1424 has a quick tip to dump out all the predefined macros in the gcc compiler. I haven't tried it, but I suspect it works for all gcc's, not just the one on Mac. Here's the script:

gcc -arch ppc -dM -E - < /dev/null | sort

Mac OS X Global Environment Variables

Having just spent way too long (couple hours) figuring out how to set environment variables on Mac OS X 10.5 in such a way that they were accessible from a bundled Java application (specifically, M2_HOME in IntelliJ so that the Maven integration would work 100%), I'm writing this up so that 1) I don't have to remember it later, and 2) to possibly save other folks the hassle.

For the impatient, the solution is

1) edit /etc/launchd.conf to contain a line like this:

setenv M2_HOME /opt/maven/2.0.9

2) reboot

Your environment variable will now be accessible in every possible context (that I could find) in which you can run your application. There are other ways to do this, but none of them worked for me. If you're interested in the details, read on.