In between midnight summer nights and dark winter days

Quickly open URLs in Terminal Mon, May 31 2010 15:34
Comments

Just discovered, after years of manual copy-pasting, that you can Command-Shift double-click any URL in Terminal, and Terminal will go ahead and open it for you. Nice!

Snow Leopard and automatically submitted Crash Reports Mon, May 31 2010 11:11
Comments

I mistakenly hooked off the "Send Crash Reports automatically" button once, and have never been able to turn it off since (there is no equivalent off button in Apple's Crash Reporter dialog. How cunning!). Now, I've finally discovered where Apple hid the magic setting that sends any and all crash reports to Apple. The toggle is located in Console.app, located in your Utilities folder. Open it, then choose Preferences from the Console menu, and uncheck the "Automatically send anonymous diagnostic and usage statistics to Apple" button.


Screenshot of Console's preferences. Interestingly, after unchecking the setting, the button is disabled, and it has been ever since.

No longer shall Apple be flooded with crash reports from my own apps!

Universal Back Button released for Mac OS X Wed, May 26 2010 21:19 (update Thu, May 27 2010 15:09)
Comments

Universal Back Button (UBB) is a simple app that implements a back button that in principle "works everywhere." The idea came from Oliver Boermans, in a blog post titled "The universal back button," in response to Brent Simmons' post on "Apps that work together." (See where I got the name?) The idea is to provide a back button that takes you back to the task you were working on, before you opened a file, clicked a link, or similar.

The idea intrigued me, and I started wondering how one might go about implementing such a thing for Mac OS X. Oliver and Brent both discuss this in the context of URLs, musing over using the referrer field or similar to achieve the effect. Nothing on Mac OS X supports this - at least for now - but we do have something similar, and the mechanism has its roots way back in System 7 (or maybe even further back?). It's called Apple Events, and it's the mechanism the window system uses to tell applications which files or URLs to open. (Apple Events have many other uses too, of course, but they are beyond the scope of this app - and this blog post!)

Now if only there were a way to tap into the stream of Apple Events flowing between applications. Unfortunately, no straightforward way exists - at least none that is documented - but Apple have included a nice debug facility that can be enabled on a per-application basis. It is activated by setting a number of environment variables prior to launching the application in question. In particular, UBB sets the AEDebugReceives environment variable, thus causing any app that receives an Apple Event to dump it to the console log. By continuously analyzing the output from the console log, UBB can infer which app caused a different app to open a file or link, and thus create a "back relation" to the app.

For instance, when I click a link in iChat, a "GURL" Apple Event is sent to my default web browser (Safari, FIrefox, etc.). UBB notices this, and when you click the universal back button in your menubar, UBB switches you right back to iChat.

Of course, the mechanism has some drawbacks. For instance, there is no association between different windows - the association only exists between different apps. So if you have several windows open in iChat, the UBB won't necessarily bring you back to the window that sent you to Safari in the first place. But, we have to start somewhere, and this is as good a starting point as any.

To make the mechanism permanent, and work for all the apps that you open, the environment variable has to be set for all applications that you launch. I fiddled with a few different options, notably trying to set the environment variables on both the Finder and the Dock (after restarting them) to avoid the "you have to log out for changes to take effect" drawback, but found that the best and simplest solution was to just set the environment variable in the Mac OS X sanctioned way: By adding an entry to the environment.plist file located in a directory called .MacOSX in your home directory.

Of course, while you are free to use the app as it stands, I have also made the source code available under the BSD license. Feel free to tinker with it, send me changes, or just give suggestions on improvements. Happy hacking!


Update May 27th: I just posted version 1.0.1 to fix a small bug in the state parsing code. Source updated too.

Also, thanks to Brent and Oliver for their mentions!

The 22 Megapixel Laptop Sat, May 22 2010 17:00
Comments

Yesterday, I finally posted a video of the 22 Megapixel Laptop to YouTube (embedded below). This is a project I worked on about three years ago, but until yesterday it had been mostly flying under the radar.

You can read a high-level overview of the 22 Megapixel Laptop, which happens to be a 2.33 GHz MacBook Pro, over here, and watch the video below.

I'm happy to see that the project has been well-received by a number of tech sites, including SlashGear, CrunchGear and Gizmodo. Thanks for the attention guys!

FolderGlance on MacUpdate Promo Tue, Feb 09 2010 09:03
Comments

If you've been holding out on getting a FolderGlance license, now may very well be the time to grab a license over at MUPromo. FolderGlance is going for only $9.99, which is 50% off its regular $20 price. Enjoy!

About me
My name is Daniel Stødle. I live in Tromsø, Norway, at 69.66° North. By day, I work as a Postdoc at the Department of Computer Science, University of Tromsø, 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 wall-sized, high-resolution displays. Read more on my personal page.

Software

Contact me
E-mail: daniel@scsc.no

Recent posts


2010
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

RSS feed
RSS