Finder Shared Items Persistence

March 9th, 2008

Occasionally, the Finder will remember a shared server in the left hand Finder pane. This sort of persistent Shared server appears most likely because of an mDNSResponder cache problem. in order to get these inactive servers to once again disappear in OS X 10.3 or 10.4, follow the advice in the knowledge base article linked above. To make them disappear in OS X 10.5 Leopard, follow these instructions:

- Open the Network Preference Pane
- Select “Make Service Inactive” from menu at the bottom of interface list on the left hand side for the Airport interface and for the Ethernet interface.
- While the interfaces are inactive, relaunch the Finder (Hold down the option key, and click-and-hold the Dock Finder icon, until a menu appears with “Relaunch” as a menu item.
- Once the Finder is relaunched, make the Ethernet and Airport interfaces active again.

This should clear out the Bonjour cache of servers, and the Shared section should only list active servers once again.

Update Processing 1.0

January 30th, 2008

Update Processing Icon
Update Processing is an application for Mac OS X to simplify the installation and updating of the Processing.org development environment. It’s wonderful that Processing is updated so frequently, however; each update creates a little bit of work for developers, especially those that rely on custom libraries and need to reinstall all of the libraries each time. By running Update Processing, each update is installed with your custom libraries (such as mysql support) automatically. It is designed to archive your old versions in case a new update breaks your application and you need to roll back to a previous version.

Download Update Processing

Version History:
1.0 - January 30, 2008
- initial public release

Eskimo-Kiss Your iPhone When It’s Cold Out

November 8th, 2007

What do you do when your iPhone rings, and it’s freezing outside? You’ve got gloves on, and the touch sensitive display won’t respond to your mitts. Either you can take off your gloves, and freeze your fingertips off, or Eskimo-kiss your iPhone. Two bits of advice: get some practice in now before your nose starts running on a daily basis, and get used to wiping your nose on your glove before touching the iPhone, otherwise get used to cleaning the crusties off of the display.

Move The OS X Swapfile On Intel-Powered Macs

June 19th, 2007

There’s been a lot of discussion over the years about the need for a separate swap partition or disk on OS X machines. I don’t have much to add to the debate, only to say that, as long as I can remember, minimizing fragmentation on hard disks has been one simple way of improving and maintaining system performance. As I mentioned in my article on FileVault, fragmentation on OS X disks is increased by the presence of large files, and therefore, my machines keep swapfiles and the sleepimage on a separate partition.
Recently, I was forced to upgrade my PowerBook, and when my MacBook arrived, I discovered that my preferred method of moving the swapfile offered by Professor Dave Bayer no longer worked. The culprit: the new GUID partition table. Prof. Bayer’s method relies on the commandline tool ‘pdisk’ to handle and distinguish partitions. I modified his script to use ‘gpt’ instead to handle the GUID partitioned MacBook.
I offer my modified version of his script to those adventurous folks who want to risk installing it, but I can not stress enough the fact that using this can cause inextricable damage to an OS X installation, and should only be attempted by people who have made complete, verified backups of their installations and are experts with the inner workings of the OS X operating system. Though this modified script has been tested quite a bit, I have only one machine on which to test it, and therefore can _not_ make _any_ guarantees of it. Use it at your own risk. I bear no liability should you mess up your machine.
Other caveats:
- This script is only compatible with Intel-based Macs
- This script has only been tested under OS X 10.4.9. Compatibility with other versions is unknown.
I ask that if you have success or failure using the modified script that you please comment here so that I can learn with which systems it is compatible and can correct any remaining issues.
Please see the superb documentation Prof. Bayer has provided on his site for further information about the original script.

Put Your Best Foot Forward

June 4th, 2007

I don’t know why I was surprised. I stopped by the Apple Store this weekend and discovered that not a single MacBook on display had the 1GB of RAM that all MacBooks ship with. Every single one had 2GB.

Is Apple saying something tacitly about the MacBook line? Does what the average consumer who walks into an Apple Store need 2GB to do what they wants to do with a MacBook? How bad does a MacBook appear to those same consumers were it running with only 1GB?

I wondered immediately if there was some bad advertising afoot, but all the little placards next to each MacBook listed the standard configuration in large bold print at the top, and listed a build-to-order configuration, one with 2GB, below that in a smaller font. However, the style of disclaimer that appears on car ads (priced as shown: $large-sum-of-dough includes optional packages) was nowhere on the placards.

And when I asked a store employee where I could find a MacBook with 1GB, he looked at each of the “About This Mac…” dialogs, and noticed, that indeed, they all had 2GB. He then said, “I have to go. There are other customers.” in a fast, but quiet, tone of voice, and stepped a few paces away looking about nervously; as if I he had accidentally divulged a company secret. Don’t worry fella - I won’t tell anyone.

HTC Announcement: Trouble Ahead?

May 28th, 2007

One of the great Internet-related pastimes is making out-of-blue predictions of what some upcoming product will be. I’m guilty of this armchair fortune-telling too. Engadget’s reporting that HTC is holding a press event on June 5th, and so I’m gonna take a stab at what the device is:
I’m guessing it’ll be a hockey-puck-shaped device that uses an accelerometer to detect what direction it’s facing. I bet it’ll be something that you spin to select menu items.
Why do I think that’s the case? The invitation posted in the article certainly suggests that. But really, the better question is, why has it taken so long for acceleration-based handheld navigation to come about?
It’s not because the technology was lacking - digital accelerometers have been around for at least ten years, and I remember a UIST paper by Jun Rekimoto from 1996 that covered just that sort of interaction.
Could it be cost? Not likely I think. At least seven or eight years ago, I remember coming across Till Harbaum’s guide to adding a tilt sensor to a PalmPilot. I built one, and it cost me a just a couple of bucks. I used it to try to experiment with Rekimoto’s ideas back then.
So, why haven’t we seen more devices that exploit accelerometers for navigation? I wish I knew. It’s always seemed to me that there was an untapped wealth of interactions when a physical object knew in which direction it was facing. By pairing that with a reconfigurable display that rendered menus and information based on that knowledge and in the correct orientation I sketched up many interfaces that I thought were exciting and natural. But, in the end, what always turned me off of designing portable devices around this sort of interaction, is that I could never come up with a configuration that wasn’t fully-attended by the user. I’ve always believed strongly that the measure of any portable device’s interface was how well a user could operate it while only glancing at it in brief intervals or even not at all. It’s been my biggest complaint about the iPod’s interface, it’s why I’m not optimistic about the iPhone, and why I like the Treo so much. I can’t wait to see what HTC has up its sleeve, and I’m looking forward to seeing more acceleration-based interfaces on portable devices. I just hope no one tries to use them while driving.

The Downsides of FileVault

March 19th, 2007

After reading Frankly, I love FileVault. It’s a little extra peace of mind that doesn’t come at a very high price. Apple has pointed out that a disk-hungry application’s performance might be affected if its files are accessed from within FileVault, but there are three additional potential problem areas that aren’t frequently discussed and results in unexpected or unpleasant user experience.

1) Applescript:
Lots of applications (like Quicksilver and Automator, for example) rely heavily on Applescript, and most Applescripts can not navigate a folder path inside of FileVault. Apple hasn’t addressed this problem since it showed up in Panther and very few Applescript developers have written their apps to either detect or circumvent this FileVault problem. So if you use FileVault, and can’t figure out why some app isn’t functioning the way you’d expect, try running it from a user account that isn’t running under FileVault.

2) Backup:
Never, ever try to backup anything except a subset of a home directory while logged into a user account that is FileVault-enabled. If your backup strategy is a full disk mirror using SuperDuper!, Carbon Copy Cloner, or the like, you must be logged in as a user without FileVault enabled. Otherwise, the backup application can not successfully capture the FileVault disk image. This also means that even incremental backups will take a bit of time since the the entire FileVault disk image must be backed up each time, and this might be tens of gigabytes.

3) Fragmentation and Performance
There has been a lot of discussion over the years about whether or not OS X HFS+ drives fragment. OS X will auto-defragment files that are less than 20 MB. FileVault being a sparse disk image means that it doesn’t need to occupy a contiguous area of the drive, but it is also guaranteed to be larger than 20MB. As a result, a drive containing a FileVault disk will invariably fragment, and in my experience, fragment badly. This slows the machine down noticeably. I have spent some time trying to lessen this issue by trying to figure out how to move my FileVault image to its own partition to no avail. If anyone can figure out how to do that, please let me know.

(4) Slow logout or shutdown)
There is a fourth issue, though not one I think is as important as the other three. Namely: when you log out of a FileVault-enabled user account, the OS offers to recover some disk space that is being wasted due to the way OS X handles file deletion on disk images. I highly recommend letting the OS recover that space, but that can take a couple of minutes depending on how many files were affected. I’ve read several comments complaining about how long it takes for PowerBooks and MacBooks to go to sleep when SafeSleep is enabled - those people would be horrified by how long it’ll take their computer to shutdown or log out with FileVault enabled. Not to mention, this “offer” comes in the form of dialog box, that doesn’t time-out. I have, more than once, forgotten about that dialog, told my computer to shutdown, left home before seeing it, and come back hours later to see my machine is still running with that dialog up waiting for me to tell it to recover the disk space.

All of this isn’t meant to discourage anyone from using FileVault. As I said before, I use it, and I’m glad I’ve got it as some additional peace of mind. However, you should consider these issues before enabling this feature.

Tweaking the VoiceNotes Widget

June 28th, 2006

I’ve tried various applications to help me get my thoughts down quickly into something more permanent, and recently I’ve tried WidgetMachine’s NotePad 2.0 and VoiceNotes. I really like NotePad 2.0, but couldn’t get VoiceNotes to record correctly. After fixing it, I like it just as much. The problem was that VoiceNotes could not record to its default location in my home folder since I have FileVault enabled. I tweaked the widget to remedy that and then modified it to minimize the likelihood that one recording would overwrite another. By default each new recording has the exact same name unless you title the recording. If I’m in a hurry to record what I’m thinking about, I don’t have time to name the recording first. So instructions to modify the widget are below. Note: the usual disclaimers apply - modify at your own risk. Also, make sure you register this excellent widget.

- Download and Uncompress VoiceNotes.zip

- Control-Click (or right-click) the Widget that was uncompressed

- Select “Show Package Contents”

- Open “voicenotes.js” in your favorite text editor

- Modify line 2 to select where notes should be stored. If you’re using FileVault, make sure the folder is not in your FileVault-protected home folder.

- Comment out line 115 that reads:

edit_div.innerText = "New Note";

by putting two slashes in front:

// edit_div.innerText = "New Note";

- Then copy and paste the following code below that line:

// Define a mostly unique name for the recording.
// Since the naming does not take timezone or daylight savings time
// into account it is possible for there to be overlap of filenames
// which may result in one recording overwriting another.
var right_now=new Date();

var name_year = right_now.getYear();
if (name_year < 2000)
name_year = name_year + 1900; 

var name_month = right_now.getMonth() + 1;
if (name_month < 10)
name_month = "0"+ name_month;

var name_date = right_now.getDate();
if (name_date < 10)
name_date = "0" + name_date;

var name_hrs = right_now.getHours();
if (name_hrs < 10)
name_hrs = "0"+name_hrs;

var name_min = right_now.getMinutes();
if (name_min < 10)
name_min = "0"+name_min;

var name_sec = right_now.getSeconds();
if (name_sec < 10)
name_sec = "0"+name_sec;

var new_name = ""+name_year+name_month+name_date+name_hrs+name_min+name_sec;

edit_div.innerText = new_name;

- Save the file.

- Double-click the widget to install it.

- When you create a new recording, it will now place the recording where you like and it will title each new recording with the current date and time by default (e.g. 20060629071908)

Swapping Modifier Keys Seperately on a Notebook and External Keyboard in Mac OSX Tiger (Update)

June 9th, 2006

Previously, I used the method described on Heiko Hellweg’s site to modify the internal keyboard driver of the PowerBook, then use the Keyboard & Mouse Preference Pane to swap the modifier keys again. This resulted in consistent modifier key behaviour on both the built-in keyboard, and on the external keyboard.

Well, OrderedBytes has released a new version (v.4) of ControllerMate, which simultaneously disabled the previous method and opened up a new method. ControllerMate v4 includes it’s own ADBKeyboard driver which overrides the built-in one. I discovered this when I upgraded to v4 and immediately my modifier keys were back to normal. I wrote OrderedBytes, and Ken wrote back to say:
“CMv4 contains a custom ADB (and USB) keyboard and mouse driver to implement the “Controller Configurations”. This should allow you to redefine keyboard keys (such as swapping the command/option keys, or the control/caps-lock keys). These controller configurations work on a per-keyboard basis so any changes made to the internal keyboard do not affect any external keyboards that you have attached.
If you want to use your own version of Apple’s ADB keyboard driver (and it sounds like you do), there are a few ways that you can do it. The easiest is probably just to delete the CMADBKeyboard.kext driver from inside the ControllerMate.kext. This will have no ill effects on anything else in ControllerMate.”

However, instead of disabling the driver, I decided to use the new features of ControllerMate to re-enable my modifier keys configuration. Using ControllerMate to manage the PowerBook’s built-in keyboard means that now the built-in/external consistent modifier key behavior is available to new USB-keyboard-based PowerBooks as well as older ADB-keyboard-based PowerBooks. As of this writing, ControllerMate is not yet Intel-compatible, but Ken has said that is the next priority, at which point it should work for MacBooks as well.

- If you previously modified your AppleADBKeyboard.kext as described in the original posting, you can return it back to it’s original condition if you wish.

- Install ControllerMate v4.

- After rebooting, and launching ControllerMate, (and registering it), make sure the “Palette” window is visible and that the drop-down is set to “Controllers“

- Drag your built-in keyboard (labeled ”Keyboard Apple”) from the Palette to the main ControllerMate Editor window. Drop it on the left half of the window below the Buttons labeled “Programming, Controller Types, Virtual Controllers”
Drag your built-in keyboard from the Palette to the main ControllerMate Editor window.

- Select the Keyboard controller configuration you just added to the Editor

- Select “Keypad LeftAlt” in the table on the right
Select 'Keypad LeftAlt' in the table on the right

- Select Keypad Left GUI“ from the ”Behavior” drop-down list
Select Keypad Left GUI“ from the 'Behavior' drop-down list

- do the same for “Keypad Left Gui” (Select “Keypad LeftAlt” as the Behavior)

- do the same again for “Keypad Right Gui” (Select “Keypad RightAlt” as the Behavior)

- do the same for “Keypad RightAlt” (Select “Keypad Right Gui” as the Behavior)
Completed configuration

- Save the configuration

- Under ControllerMate’s Preferences, make sure that “Enable ControllerMate Helper” is checked

- If you haven’t already, open the “Keyboard & Mouse“ System Preference and under the ”Keyboard“ tab, click the ”Modifier Keys…“ button and then swap the Command and Option keys.

This method should work on new and old PowerBooks alike, and once a Universal version of ControllerMate is released, it will work for MacBooks as well.

KGTD and Next Actions in iCal

February 27th, 2006

Update: Ethan has included this functionality in the latest version (0.83) of KGTD. I’ll leave this up for anyone who doesn’t want to upgrade yet.

I love, and live by, Ethan Schoonover’s KGTD. However, I also use my Treo to take care of tasks while commuting. However, KGTD doesn’t sync tasks into iCal so that I can identify Next Actions in each Context. So I modified Ethan’s code slightly, and now Next Actions sync as “important” priority tasks, and all other tasks have no priority.
I’m certain Ethan will include a similar feature in the next version of KGTD, but if you need this functionality right now, you can download the modified version of the Sync script.
Modified 0.75.2 Sync.script
To install it, after uncompressing it:

  • Run the current Sync script from KGTD, and then sync all your devices to make sure all your data is in place.
  • Quit KGTD
  • Backup your iCal data, and KGTD just incase something unexpected happens
  • Delete all your tasks in iCal. This prevents duplicate tasks
  • Open the “/Library/Scripts/Applications/OmniOutliner Pro/Kinkless” folder.
  • Rename “Sync” to “Original Sync”
  • Copy the modified “Sync” to the Kinkless folder
  • I’ve only modified a couple of lines in Ethan’s script, but something unexpected might still go wrong. You use this script at your own risk; I am not responsible for any lost data. That said, I’ve been using it daily for months without any problems.