In between midnight summer nights and dark winter days

Making Universal Back Button work on 10.6.5 and later Fri, Jan 07 2011 11:46

A user recently brought to my attention that Universal Back Button isn't working on Mac OS X 10.6.5, nor is it working on the just-released 10.6.6. I spent some time trying to figure out the cause, and it comes down to this: Apparently Apple has begun actively filtering environment variables from the two pertinent places where they could be set and still have an effect on GUI applications: In ~/.MacOSX/environment.plist and ~/.launchd.conf. For posterity, attempting to set either of the following environment variables in either of these files will fail:

  • AEDebug
  • AEDebugSends
  • AEDebugReceives

It's hard to say why the good folks at Apple have made this change. Possibly they saw the environment variables as potential security risks (after all, information about URLs being exchanged between applications is exposed in the user's console log - although the information isn't sent anywhere else, of course), or they felt that allowing these variables to be set could adversely affect the performance of the user's Mac. My guess is that it's a combination of these two concerns, though I suppose we'll never know the true answer.

So, how do we fix it? There is just one place left (that I've been able to discover, at least - if you know of anywhere else, please chime in). By editing /etc/launchd.conf, we can reinstate the environment variable we need. The downside to this solution is that it will be active for all users on your Mac. That's hardly ideal, but then again, I can't say I much care for Apple's solution to this problem in the first place. After all, it's my computer - why can't I set the environment variables I want?

To fix Universal Back Button on 10.6.5 and later, open Terminal (located in the Utilities folder inside your Applications folder), and then run the following command:

sudo bash -c "echo 'setenv AEDebugReceives 1' >> /etc/launchd.conf"

Note that the command is all one line, in case it wraps in your browser. You'll be prompted for your your administrator password in order to make the change. To reverse the change, execute the following (again, it's all on one line. I suggest copy-pasting it to Terminal to avoid any difficulties:

sudo bash -c "sed -e '/setenv AEDebugReceives 1/d' /etc/launchd.conf > /etc/launchd.conf-tmp &&
mv -f /etc/launchd.conf-tmp /etc/launchd.conf"

Once either the first or the second command has been executed, you will need to restart your Mac in order for the changes to take effect. All of this should make it into an update of Universal Back Button sooner or later, but I wanted to put the fix out here until I have time to post an update.



Previous: Creating pthreads in C++ using pointers to member functions Next: FolderGlance 3.0

About me
My name is Daniel Stødle. I live in Tromsø, Norway, at 69.66° North. By day, I work as a researcher at the Northern Research Institute in Norway; by night, I run my company SCSC. I do most of my development on and for Mac OS X. My research is geared towards interaction with and visualization of geospatial data. Read more on my personal page.

Software

Contact me
E-mail: daniel@scsc.no

Recent posts


2011
Jul 28: Running iTunes in a debugger (gdb)
Jul 25: The /Volumes/MobileBackups directory
Jul 20: FolderGlance 3.0.1 supports Lion
Mar 03: Quick tip: Speeding up Xcode compilations
Mar 02: FolderGlance 3.0
Jan 07: Making Universal Back Button work on 10.6.5 and later

2010
Sep 03: Creating pthreads in C++ using pointers to member functions
May 31: Quickly open URLs in Terminal
May 31: Snow Leopard and automatically submitted Crash Reports
May 27: Universal Back Button released for Mac OS X
May 22: The 22 Megapixel Laptop
Feb 09: FolderGlance on MacUpdate Promo

2009
Sep 28: FolderGlance 2.5.3 is out
Sep 21: FolderGlance 2.5.1 adds features and fixes bugs
Sep 16: FolderGlance 2.5 released!
Sep 10: Intriguing: Snow Leopard ships with the iPhone's multi-touch API built-in
Sep 03: FolderGlance and Snow Leopard
Mar 15: Fixing Keynote '08 and '09 to work with the Scripting Bridge
Feb 26: A website in an image
Feb 09: Display wall multi-touch

2008
Feb 19: Spaces.. Spaces.. Spaces.. retires
Feb 08: How-to: Reverse engineering the Dock to fix Spaces
Jan 25: Interacting with wall-sized displays

2007
Dec 20: Interesting Finder bug
Dec 06: Developing applications for the iPod touch (and the iPhone)
Nov 15: Spaces.. Spaces.. Spaces.. and 10.5.1
Nov 15: Thread creation using pthread_create() on Leopard
Nov 13: Spaces.. Spaces.. Spaces..
Nov 07: FolderGlance, Leopard and the More... menu
Nov 06: FolderGlance and Screen Sieve now also on Leopard!
Sep 16: Mysterious window server hangs

Archive
2007
2008
2009
2010
2011

RSS feed
RSS

Links
SCSC
Blog frontpage