Sync program preferences and settings with DropBox
I've been using DropBox for a few months, but not for anything really cool, until now. It occurred to me (finally, I'm slow, I know) that I could use DropBox to sync settings of programs I use on both of my machines.
The Problem
I use two different machines quite regularly; My laptop, a MacBook Pro and a desktop, an iMac. I float around a lot with the laptop, working sometimes from the kitchen or bedroom. Other times, and most of the time, I use my iMac in the downstairs office. The kicker is I have several programs I use on both machines and keeping them in sync has been difficult if not impossible.
One example is Transmit. I have a bunch of FTP sites on my desktop that are missing from Transmit on my laptop. In order to do a job I'll either need to set the site up on my laptop or go to the iMac and do the work there.
Another example, 1Password. It's been terribly annoying to have passwords missing on one machine. Or even worse, if I change a password on one machine and the other didn't know about it, I'd try logging in with the old credentials to no avail. Terribly annoying!
Last example, because I think you're starting to get the picture, is Things. Things is the new task management software I've been checking out recently. It's simply not possible to use Things on two different computers and have them sync properly, or is it?
The Solution
It is, and it's all made possible using DropBox and a little something called Symbolic Links. In a nutshell, a symbolic link is and does what it says; it's a link that points to the original file. Sort of like an Alias, which you've probably worked with if you're on a Mac. Here's the basic idea, in Terminal you'd type the following:
ln -s ~/path/to-where-you/put-the-/dropbox-file/ ~/path/to-where-the-original-file-was/
Pretty simple right?
How To
One piece of advice to make things simple is to duplicate the local directory structure on your Dropbox. So I created a folder "Library" and inside that folder I have "Application Support" and another "Preferences". Here's the steps in order.
- Make sure the program is closed.
- Create a set of folders in the root of your Dropbox folder. "/Dropbox/Library/Preferences/"
- Navigate to whatever you want to sync, in this case we'll do the transmit preferences file "com.panic.Transmit3.plist"
- Move that file to your Dropbox/Library/Preferences/ directory.
-
Create a symbolic link to point to this new file
ln -s ~/Dropbox/Library/Preferences/com.panic.Transmit3.plist ~/Library/Preferences/com.panic.Transmit3.plist
You'll want to do the same on your other machine. That's it, done!
Note:
One thing to note, this doesn't work too well with some programs if you have the programs open at the same time on two different machines. I know this is the case with Things, which I believe uses an xml database file. You'll want to look out for that and make sure one of the programs is always closed. Minor drawback, imo.
Other Helpful Links
Some helpful articles:
-
Macoshints.com tutorial on symbolic links
-
Sync 1Password with Dropbox
-
Sync Things database with Dropbox
Update:
Transmit keeps the passwords to your sites in a keychain. Specifically login.keychain found in /Library/Keychains/login.keychain. There's a couple different things you can do.
First Option: Put them in a different keychain and sync that with dropbox (e.g. - In Keychain Access (the program) - File > New Keychain, then copy the transmit specifics into that keychain). If you use this option, any time you add a new site w/ a password to Transmit, you'll need to go into Keychain Access and drag it over to the new keychain. Might be a pain depending on how frequently you're adding sites.
Second Option: Leave your transmit info in login.keychain and just sync that.
I opted for the second option since my machines are pretty similar. I have the same password needs on both machines. In either case here's what I would recommend for syncing. It's not the symlink solution, it's easier.
- Determine which keychain you want to keep (meaning, from what machine, probably whichever has more passwords). Move that into /Dropbox/Library/Keychains/
- Open Keychain Access (the program) and go to File > Add Keychain. Browse to the keychain you just put in your dropbox folder and select it.
- If you're syncing login.keychain: From within Keychain Access, on the sidebar, right click on the keychain titled "login" and select the option "Make keychain "System" default".
- You should be good to go!