Using Dropbox with Mac OS X
Important Warning about Metadata
Synchronizing Existing Folders and Files
Example: Synchronizing Address Books
Synchronizing via a Shared Folder
As a Mac OS X user, I took some time to understand how I could best use Dropbox, given the way that it works. Thanks to all the Forum users who helped me understand this.
The basic introduction provided by the Dropbox team is, inevitably, cross-platform in its orientation. So it doesn't fully explain some important points specific to Mac OS X.
I've tried to provide some extra guidance here, based on my experience. Please let me know of any corrections or clarifications needed; my contact details are available on my Home page.
Currently [1 March 2009], Dropbox doesn't synchronize Mac OS-specific metadata (in which I include extended attributes and resource forks).
Metadata (in the sense used here) is information about a file which is not stored in the file itself, but somewhere else on the hard disk, hidden from the general user.
Some Mac applications rely on information stored in metadata. If they do, the files they create will not synchronize successfully with Dropbox.
You can discover whether files have different kinds of metadata, as explained below. However, this doesn't tell you whether a particular application depends on it. For example:
- Microsoft Word .doc files have metadata, but these don't appear to store anything vital, so .doc files synchronize fine.
- According to the forums, MYOB relies on metadata to identify file types when it opens them, so MYOB files will not synchronize with Dropbox.
- Image files (JPGs, TIFs, etc.) continue to work with GraphicConverter after Dropbox synchronization, but its rename actions don't, because the Finder Info metadata is required but isn't synchronized.
Under OS 10.5 Leopard, unix buffs can use Terminal commands to get some information about metadata generally.
- How can I tell what the file system metadata is?
- The command
mdls <filename>shows all the file related metadata for a file.
- How can I tell whether a file has extended attributes?
- Use the command
ls -l. If there's an "@" sign at the end of the permissions information, then the file has extended attributes (which include resource forks).
- How can I tell what the extended attributes are?
xattr -l <filename>. This lists the extended attributes and their values. "com.apple.ResourceFork" shows the presence of a resource fork.
Using Dropbox effectively under Mac OS X means using 'symbolic links'. For unix buffs, these can be created via the Terminal application. For those who prefer the GUI approach, I recommend installing Nick Zitzmann's SymbolicLinker contextual menu plugin via:
It comes with clear "How to Install" instructions (in the file "Read Me First!").
- Basically you copy the "SymbolicLinker.plugin" into the "Contextual Menu Items" folder in the top level "Library" folder.
- After you've restarted (or logged out and logged in again, or quit and restarted the Finder, depending on what you know how to do), control-clicking or right-clicking on an item in the Finder will reveal an extra menu item, "Make Symbolic Link" (under the "More" submenu in OS X 10.5 Leopard).
- you have two or more computers linked to a single account in Dropbox
- you want to synchronize an existing folder or file among them.
There are at least three different approaches.
Move the folder or file to your Dropbox folder.
This is the most obvious approach, and apparently the simplest. The disadvantage with an existing folder or file is that there is probably a good reason why it was where it was before you moved it. Putting everything into your Dropbox folder messes up the organization of the existing file system.
My advice: only move a folder or file to your Dropbox folder if there's no reason to keep the folder or file where it was originally.
Leave the folder or file where it is. Create a symbolic link (e.g. using the SymbolicLinker contextual menu -- see the section above). Move the symbolic link to your Dropbox folder.
Dropbox doesn't synchronize the symbolic link; instead it synchronizes the original folder or file which the symbolic link 'points to'.
However, the name of the symbolic link matters since this is the name that Dropbox will give to the folder or file on the Dropbox server (i.e. the name visible through the web interface). See the diagram below. Don't change this name once Dropbox has synchronized!
Setting it up on several computers needs a little care. Suppose you've used this approach on one computer, and put the symbolic link in your Dropbox. Now you go to a second computer linked to your Dropbox account and start it up. If you leave Dropbox to run, it will put a copy of the linked folder or file in your Dropbox folder -- but you don't want this, you want another symbolic link here. If you don't have a copy on this machine, leave Dropbox to run, and then move the folder or file to where it should be; then quit Dropbox while you set up the symbolic link. If you do have a copy on this machine, and Dropbox is taking a long time to create another copy which you're just going to trash, quit Dropbox. Now create the symbolic link and move it into your Dropbox folder (replacing any original you don't need), giving it exactly the same name as the symbolic link on the first computer. Finally start Dropbox again (it's in the Applications folder).
The diagram below tries to show how all this works when the symbolic links are to folders, which is the most usual case. Note that the two folders called "SomeFolder" don't have to have the same name, but the synchronized symbolic links do. All five folders and symbolic links can have the same name, if you want.
One thing you have to watch is that if the symbolic link in your Dropbox folder is to a file (which I don't recommend), then if a conflict occurs (because copies get updated on more than one computer before Dropbox can synchronize them), real files, not symbolic links, will appear in your Dropbox folder. This is slightly harder to sort out than with the third approach below, since real files will be mixed with symbolic links.
Move the folder or file to your Dropbox folder. Create a symbolic link (e.g. using the SymbolicLinker contextual menu -- see the section above). Move the symbolic link to where the folder or file used to be. (If you used SymbolicLinker, you may have to remove the " symlink" in the name, because some applications seem to look for a particular name as well as the actual file.)
There are some applications which don't accept this approach. They won't follow the symbolic link, and instead re-create the folder or file where it was. In this case, you have to use (2) above.
Personally, I prefer (2) above. I think of Dropbox mainly as a way to achieve synchronization. So, except for the Public and Photos folders, I don't want to store real folders and files in my Dropbox folder.
The Address Book application stores all its data in the folder "~/Library/Application Support/AddressBook" (where "~" stands for your Home folder). Up to now (version 4.1.1), there isn't a preference which allows you to store the data elsewhere.
So to synchronize your Address Book between computers linked to your Dropbox account, you can use the second approach described in the section above. I'll assume you have the SymbolicLinker contextual menu item installed.
- On one of the computers (call this the first computer), go to your Dropbox folder and create a new folder in it called "Application Support Items". (This will make it clearer if you synchronize other data in this way, such as your Google Earth places.)
- On the first computer, find the folder "~/Library/Application Support". One way of doing this is to enter the path in the box in the Finder's "Go to Folder..." menu item. Control-click or right-click on the "AddressBook" folder and make a symbolic link. Drag this symbolic link to the new "Application Support Items" folder in your Dropbox folder.
- Now when you first start up one of the other computers linked to your Dropbox account (call this the second computer), Dropbox will create the "Application Support Items" folder and start putting a copy of the first computer's "AddressBook" folder in it. Quit Dropbox on the second computer once the "Application Support Items" folder has appeared. Trash the "AddressBook" folder in the "Application Support Items" folder, and replace it by a symbolic link to the second computer's own "AddressBook" folder, as per (2) above. Now start Dropbox and it will synchronize the actual Address Books.
- Repeat for all the linked computers.
Rant I hate the way that the "Application Support" folder contains a mixture of user data and system/application files. For example, if you use Firefox, you'll find that the "~/Library/Application Support/Firefox" folder contains stuff which you may well want to synchronize across computers (like your profiles) and stuff which you definitely won't (like crash reports). This is really bad design.
In principle, synchronizing across different Dropbox accounts via a shared folder is just the same as synchronizing via multiple computers linked to the same account.
It's easier not to share a folder directly. Instead use the following approch.
- On your computer, go to your Dropbox folder and create a new folder in it with a suitably descriptive name. (By the time you have a complicated Dropbox folder with symbolic links, actual folders and files, multiple shared folders, etc., you'll be glad of helpful names!)
- Put symbolic links into this folder for all the files/folders you want to share.
- Invite other Dropbox users to share this folder.
- When they receive your invitation, they must allow Dropbox to create the shared folder. There must not be a folder (or symbolic link) with the same name already in their Dropbox folder, otherwise Dropbox will create a new shared folder with a number in its name.
- Once the shared folder has been created, the sharer should quit Dropbox, replace any actual folders and files that Dropbox has already put there by symbolic links with the same name, and then start Dropbox again.