A method to sync almost any application between 2 or more Macs

by Administrator on July 7, 2009

dropbox.jpg

I’m thinking this couldn’t possibly be this easy but what started out as a relatively simple task turned into a ah-ha moment tonight. Long story short – I came across a brain dead easy way to synchronize just about any application between multiple Macs using free software. Full disclosure, I haven’t yet looked into this on any bigger picture scale but for my needs, it has worked flawlessly. For you and your Macs – caveat emptor my friend.

A little background – I’ve been using Apple’s online tools (formerly .Mac currently .Me) since way back in 2000 when they were quite rudimentary and called iTools (back when they were even free). I still keep an active .Mac account (I don’t think I’ll ever be able to bring myself to call it .Me which just sounds so…lame) and I primarily use this account for purposes of syncing various apps (Calendars, Contacts, Mail, etc). With the iPhone 3GS, syncing is all the more important but one of my favorite aspects has always been the syncing of certain other applications (Apple and Non) like Transmit, Keychains, Dashboard Widgets, Mail accounts and Bookmarks. I always found that syncing function to work (mostly) and I’ve always wondered why more applications didn’t tie into .Mac’s sync services.

Tonight, I’ve discovered an easy solution to this issue that I wanted to sshare. I was an early user of Cultured Code’s Things.app and was happy when the iPhone version of Things arrived (and alsowon an Apple Design Award thank you very much). As expected, the desktop version synced nicely with the iPhone/iPod Touch app. Like a lot of developers, I tend to split my time between multiple Macs and after you get in the habit of routinely using an application, it becomes natural to want it on whatever computer you happen to be in front of and Things certainly felt that way for me. With the syncing already happening between my desktop Mac and the iPhone automatically, I needed to find a quick way to get the Things database to now sync between the two Macs that I work on.

Being the kind of company that seems to anticipate your needs before you do, the fine folks over at Cultured Code had set up fully user editable wiki and sure enough, someone else had a similar need and found a very elegant solution using nothing but free software to do it (not to mention, extremely popular free software (Dropbox) that many of us already have installed on our systems). I took just a few minutes, tried it out, and the problem of syncing Things on multiple Macs was history.

things.jpg

Technically, it’s not at all a very complicated solution and with very minor modifications, you can get it work for just about any Mac applications (disclaimer: I’ve done this with the apps I find it necessary to have sync’d – your mileage may indeed vary – as always back that shit up before playing with any of this). The big hero of the hour is the free software I mentioned called DropBox. For those of you not using it, I highly recommend it. It’s an application that really does have a lot of potential uses. In my case, I have a folder where I frequently save my weekly segments for the MacReviewCast and on the other end, Tim Verporten receives the audio file minutes after I save it locally without me having to lift a finger. Also, we have a group of people that use DropBox to collaborative on files for a book we’re writing and DropBox makes sure we all always have the most recent files. Another common use is for syncing files on multiple computers. Bottom line, you owe it to yourself to go check out DropBox and get yourself a free account. While you are signing up, be a pal and enter my email (powellj@mac.com) as the referrer and they’ll give me additional free space on my DB account.

Back to our story – having said all that, here’s how it works in a nutshell:

Many of your applications hold persistent data in a common location: \ username \ library \ application support \ app-or-company-name \

Inside this folder, you can usually find all your data stored in some common file format which can be anything from a flat text file, sqlite database, xml or whatever. Most applications are hardwired to look for their data in this specific location (in some apps this can be changed, but more – its more hassle than its worth).

You can install DropBox on both (or more) of your Macs to then keep these special data folders (for each app separately) sync’d up on both machines so regardless of which Mac you happen to be at, the data is automatically up to date on all machines. This basically does what sync services in .Mac/.Me does only without the $99/year pricetag (and in my experience, its way faster than .Mac’s syncing). You will need to do all of this in the terminal (until someone takes 5 minutes and writes an AppleScript for it) but I’m thinking that anyone who has the need think in terms of syncing data between multiple Macs and takes the time to read this far, isn’t likely to be the kind of person scared off by a little command line action. (but if you are, be sure to check out Dan Benjamin’s fine new screencast called Meet the Command Line over at PeepCode.

Details, details … (straight from Culture Codes wiki post on the subject) – just know that you’ll have to manually look in ~/ library / application support / XXX / to see the specifics of the files & app you are needing to keep sync’d. Drop me a line if you have questions on it.

This is a “how to” to keep Things in sync between Macs using Dropbox.
  • First we make an appropriate folder on Dropbox (you just need to do this on your first computer, and obviously both computers need to have Dropbox installed): mkdir -p ~/Dropbox/Library
  • Then we hop into the folder just above where Things stores its database: cd ~/Library/Application\ Support/Cultured\ Code
  • We now move your existing Things database onto Dropbox (again, just on the first computer): mv Things ~/Dropbox/Library/Things, OR:
  • If you’re on the second computer (at work, for example), you need to remove the Things folder: rm -rf Things
  • Now we link the Things folder to Dropbox: ln -s ~/Dropbox/Library/Things Things
  • Instead of doing the last two steps, another option is to invoke Things by pressing the ALT key and choose the new Library in the Dropbox directory.
  • Based off the longer version on my article: Synchronising Things using Dropbox Note: This sync solution seems to work fine if you don’t run both Things apps at the same time. However, the one caveat is that scheduled todo’s based on iCal calendars (such as the Birthdays calendar) do not sync correctly. One Things app will have the correct calendar reference, but the other will have a ?. This is possibly because Things uses an internal reference for the calendars, not their display name.

ccp.jpg

After Things.app, the first application that I really need to keep in sync was Code Collector Pro from M Cubed Software. (Shameless plug – if you work with any kind of code whatsoever you really ought to check out CCP. It is lightweight, extremely flexible and comes with a free web service to share your codebase with others (optional) but if you take nothing else away from this article check out CCP, it absolutely rocks). I modified a few directory and file names but other than that, the instructions above did the trick nicely and now I’ve got up to date copies of all of my source code on either machine and I don’t even have to think about it – it just happens.

Obviously the weakest link in the chain here is the huge amount of trust being placed in DropBox. Technically, a copy of every bit of data is going through their system and that is definitely worth significant consideration. The data is technically stored on Amazons S3 service and Drew from DropBox adds: “We encrypt files using AES-256 before storing the file data on S3, and the underlying transport (for everything) is SSL. (we’ll also be adding the ability to provide your own private key.)”

I’d be curious to hear how this works out for you all. Drop me a line at powellj@mac.com

Comments on this entry are closed.

Previous post:

Next post: