Categories
How-Tos iOS & Mac how-tos

how to sync your Macs with Dropbox – for free!

Dropbox.jpgHappy Christmas, everyone! I hope you all got what you wanted and/or what you deserved. 😉

My Christmas treat to myself was to spend the evening geeking out with my Dropbox setup. It’s a free service that basically allows you to keep certain files constant across multiple machines. You create an account, download software to the machines you want to use and it creates a folder called ‘Dropbox’ on those machines. Whatever you put in the Dropbox on your computer is uploaded to the server space (where it’s secure unless you mark it ‘Public’), and is subsequently downloaded to the Dropbox folders on all the other machines you’ve set it up with, maintaining consistency no matter what machine you use.

It’s probably easier to understand if you just try it. It’s completely free, works with Macs, PCs and iPhones – sign up via my links and you’ll even get 250MB extra space on top of the standard 2GB, as will I. Plus, if you follow five of the six ‘Getting Started’ tips once you’ve signed up you get another 250MB free!

I’ll admit I wasn’t sure what to use it for at first. However, combined with the free iPhone app that accesses your server space, I found it was useful for syncing work documents like callsheets or scripts, as well as being a simple and free way to distribute large files like zip archives of photos for friends and clients.

Finally, I started using it instead of the Sites folder for storing the local copies of the code that runs my websites so that I can make edits on my iMac and be able to pick them up later on the laptop, with no effort copying the files between the two machines.

However, I felt like I was missing out on some cool uses, so I started investigating syncing the settings of regularly used applications ike Safari, iCal, Address Book, Things and 1Password, and this is how I did it.

using Dropbox to sync Macs

In all cases the iMac has the most recent and more complete files so I want to sync them to my laptop and from that point on have any changes made on either machine sync to the other. Therefore, for each application what we’re going to do is:

– find the files on your ‘master’ Mac;

– move them to the local Dropbox folder, which will subsequently copy the files to every other machine using Dropbox;

– then issue a ‘redirection’ to each application so that they can find the files in the Dropbox instead of where they ‘should’ be.

In principle, this is pretty simple. In practice you’ll usually need to use either Terminal to issue the ‘redirection’ information to your Mac’s Finder, or download a bit of software for your Mac that will issue the exact same redirection using the OSX graphical user interface you’re probably used to. I went with the latter option as Terminal scares me.

the key to syncing: Symbolic Links

This redirection information is called a Symbolic Link. What you’re basically doing is moving the settings information that the application uses, but leaving behind a signpost in the original location that points to the new location (which is in the Dropbox) so that the application can continue to read and write to those settings files. The Symbolic Link is similar to what you may know as an ‘Alias’ (especially old-school Mac users who remember System 7!) but they are significantly different and should not be considered interchangeable. Stick with Symbolic Links if you want this to work!

If you want to use the GUI Symbolic Link creation tool I mentioned above, get it here – please do take the time to have a read of the information on that page, it explains it in more depth than I did and it’s quite interesting in a geeky way.

Once you’ve installed the Dropbox software on your various machines, as well as downloaded and installed the version of the Symbolic Link tool that’s appropriate to your system, we’re ready to have a go!

syncing Safari bookmarks & history with Dropbox

Pick the machine that’s got the most up-to-date bookmarks/history and start there.

First, quit Safari – open this page in a different browser if you need it. The bookmarks and history file are kept in ~/Library/Safari (where ~ is your User folder). There’s a few other items in there too, but my understanding is that you’re going to need to move the whole Safari folder, not just the bookmarks and history .plist files.

Open two Finder windows. In one, navigate to the Safari folder as above. In the other, navigate to your Dropbox folder. Create a folder called ‘Library’ in your Dropbox. This is where we’re going to keep your Dropboxed settings for all the apps you sync up, so it helps to be organised.

Screen shot 2009-12-26 at 15.08.07.png
The original Safari folder, moved into the Dropbox

Now move the Safari folder from it’s current location into the Library folder in your Dropbox (if your Dropbox is on an external drive, the Safari folder will copy as opposed to simply move – in this case you’ll need to delete the original once the copy is complete).

You should see the Dropbox icon in your menu bar start to work as it uploads the Safari folder to the server. At this point all your Safari settings are now in the Dropbox and if you were to launch Safari it would not be able to find them and would start over, creating an all new’Safari’ folder in the expected location. We don’t want this, so don’t launch Safari yet! We need to tell it where it’s settings are first.

Select the Safari folder in your Dropbox. Now follow the instructions for your version of the Symbolic Link tool to create a Symbolic Link to the Safari folder. It will most likely create a folder called ‘Safari symlink’, with an icon of a folder and an arrow at the bottom. This is the signpost we need. Move it out of the Dropbox folder and into the original location of the Safari folder, ~/Library.

Screen shot 2009-12-26 at 15.10.22.png
The symbolic link, renamed and moved to the original location

If a copy of the Safari folder still remains in the original location, delete it. Rename the symlink to ‘Safari’ (without the quote marks). You should now be done for your first machine. Just to double check, launch Safari. To all intents and purposes, nothing should look different as Safari is being redirected to it’s settings via the symlink you made.

Now head to your second machine, in my case my laptop. Check your Dropbox folder on that machine and you should see your Library/Safari folder downloading from the server. Once it’s complete, follow the symlink creation instructions from above: create a symlink to the Dropboxed Safari folder and move it into ~/Library on your machine, renaming it and replacing the existing Safari folder.

Now launch Safari on that machine and if all is working well it should have all the bookmarks and even the history from your original machine. These should now also sync back and forth.

Once caveat: I don’t think it plays too nice if Safari is actively running on both machines. I haven’t tested that really, but it’s not often this happens in my situation. Either way, quitting and reloading Safari should update the software with the latest changes.

syncing iCal and Address Book with Dropbox

I was very nearly tempted to have a go with the MobileMe trial this week, mainly to have all the cool security stuff for finding or wiping my iPhone if it’s lost, but also because it would allgedly sync my iCal and Address Book between Macs. However, Dropbox offers a free way to achieve almost the same level of syncing, which will be more than enough for most casual users.

The process is exactly the same as with Safari – find the iCal and Address Book files you want to sync, move them to the Dropbox, create a symlink to each in its new location, then move the symlink back to where the original locations where the application expects to find them.

Screen shot 2009-12-26 at 15.14.58.png
This is what my Dropbox looks like to achieve iCal and Address Book sync

I synced up my iCal calendars by moving the Calendars folder from ~/Library to Dropbox/Library on my ‘master’ computer, then creating the symlink and moving it to the ~/Library folder after renaming it from ‘Calendars symlink’ to just ‘Calendars’. Once the folder has distributed to your other Dropbox-enabled machines, repeat the symlink process on those machines.

Similarly with Address Book, move the folder named ‘AddressBook’ from ~/Library/Application Support to your Dropbox location (in my case Dropbox/Library/Application Support), create the symlink, rename it and move it to the original location. Repeat the symlink process on your other machines once the Dropboxed folder has propagated.

syncing Things with Dropbox

Things is the rather lovely ‘to-do’ software from Cultured Code, and they actually describe how to sync up multiple copies of Things using Dropbox on their wiki. However, their method uses the Terminal to make the symlink. If you’re feeling confident, go ahead and follow their instructions – you won’t mess anything up if you just type the specific codes they give you.

There is, however, another way that doesn’t require the use of any Symbolic Links at all. This is because Things handily gives you the option to tell it where the database files it needs are without the need to set up signposts using symlinks. However, we do still need to move the master database files into the Dropbox manually. First of all, remember to quit Things on the machines you’re syncing.

Screen shot 2009-12-26 at 15.17.07.png
The path to my Dropboxed 'Things' database folder

The folder you want to move is called ‘Things’ and should be located in ~/Library/Application Support/Cultured Code. Now, where you chose to keep it in your Dropbox is up to you but to keep things ordered I created a new folder in Dropbox/Library called Application Support, then another new folder called Cultured Code inside that, and I moved the Things folder into there.

Screen shot 2009-12-26 at 15.18.16.png
Redirecting 'Things' to the Dropboxed database folder

Next, fire up Things while holding the Alt key. This will bring up an option to select an existing database or start a new one. Direct Things to the location in Dropbox that you moved the database folder to, and that should be that. Now head over to your other machine, check that Dropbox has downloaded the Things folder from the server and once complete, fire up that copy of Things the same way and direct it to the Dropbox as before. Once confirmed to be working, you can go ahead and delete the original Things folders from that machine too.

Just like with Safari (and most other apps you sync this way) there can be confusion if you try running and amending multiple copies of Things at once, but that’s not much of a hassle really. Also bear in mind their comments about issues with using this to sync todo’s with iCal.

syncing 1Password with Dropbox

How you achieve this depends on what version of 1Password you’re using, I think. I’m on v3 and have moved onto their ‘Agile Keychain’ way of doing things. In this instance, all the passwords I use are kept in a file called ‘1password.agilekeychain’ and were stored in ~/Library/Application Support/1Password.

However, 1Password is one application that makes it super easy to sync up with Dropbox, in that the preferences pane actually lets you not only point the application to wherever you like to find the keychain file, but will actually move it to wherever you like as well.

Screen shot 2009-12-26 at 15.00.57.png
1Password 3's Preferences window - we'll be using the Data File section

Assuming you’re using 1Password 3, fire it up on your master machine (or whichever has the fullest 1Password keychain) and open the preferences. The very first thing you see should be the Data File options. Click on the rightmost button, ‘Move…’ and set the location in your Dropbox that you want to use. Again, for ease of use I created a file hierarchy that matched the original location – Dropbox/Library/Application Support/1Password and moved it to there.

Then on every other machine I use 1Password, I went to the same preference pane and this time clicked the ‘Choose Another…’ button, and pointed it to the freshly-downloaded 1Password.agilekeychain file that was sitting in the local Dropbox. Quit, restart, job done!

syncing other applications with Dropbox

As you can tell from the screenshots above, I’m experimenting with using Dropbox to sync a few other applications too, namely some Popcap games (Peggle Deluxe, Peggle Nights and Plants Versus Zombies). In doing so I’ve experienced a couple of situations where Peggle Nights in particular will give me the ‘application quit unexpectedly’ alert, even though I did specifically ask it to quit.

I can’t tell if this is because of my Dropbox setup or not, because it seems to do the same thing even when I put all the files back where they should be. Perhaps the game is just buggy on this hardware, because the sync does seem to be working across my Macs – save files from play time on one machine load when I fire up the game on the other machine.

Overall, a lasting caveat for all these syncs are that they can be a bit flakey if applications are run on more than one machine at the same time. If you can work around that, it’s a fantastic use for some free software, and a superb advert for purchasing an upgrade to 50GB should you need it. I’m finding that so far I’m within my limits on the free account, but if y’all would like to sign up with my link we’ll all get a bit more for free!

Cheers for reading, and have fun Dropboxing!

By myglasseye

I'm a Glasgow-born stills photographer and camera operator living and working in London, UK. As well as cameras I'm into writing, gaming, general geekery and beers by Brew Dog.

Leave a Reply

Your email address will not be published.