Sunday, December 10, 2006

Mac Tip: Auto-Connect to Shared Drives

I don't use shared drives on OS X as much as I would like. It sounds great in theory: access a folder or entire hard drive on one computer, when it actually lives on another. Using drag-and-drop is simpler than ftp for copying files over to the laptop, or sharing song files between two computers, or editing a file from a different computer without making a separate copy.

In practice, this technique has always had a few glitches. OS X tends to be clumsy when you're connected to another computer and then that other computer goes to sleep, or you start a VPN which cuts off all other network connections. You might see a complete freeze for several minutes before OS X realizes the other computer isn't responding. You'll see that freeze at random times, for example when OS X puts up a File Save dialog and decides to check all connected drives. Once it decides the shared drive is kaput, you have to reconnect, which involves a sequence of dialogs even if you've stored the password in your keychain.

Lately, OS X has been improving in this area. There hasn't been as much freezing, the timeout period is shorter, and when the error dialog comes up, you can unsleep the other machine and the operation goes ahead without you having to reconnect.

One time-saving tip that I just discovered recently: If you make a shortcut to a folder on a shared drive, you can drop a file on the shortcut, and the shared drive is automatically mounted without any password prompts or other dialogs. The file is copied, and the shared drive stays mounted. I use this trick to do timed audio recordings on one computer, then shoot them over to the Music folder on another computer, even though most of the time the shared drive isn't connected. To make the shortcut, drag the original item while pressing Command and Option, so the mouse pointer changes to a little curved arrow.

The next trick will be to figure out some way to auto-mount the drive in the absence of a file I really want to copy. Perhaps have some dummy file that always gets copied to the same place. Also, this technique doesn't work when copying a file from the command line. The copied file just overwrites the shortcut.

No comments: