Pseudo-sync Safari Bookmarks on your own server

Mar 30, '11 07:30:00AM

Contributed by: fulmar2

There are tons of methods to sync your Safari bookmarks: free apps/plugins like xMarks, and paid services like MobileMe. Unfortunately, none of them met my needs/criteria, which are: free, private, and secure. This hint is a combination of information gleaned from many locations, and is not actually a sync. Instead, you will have one single set of bookmarks that you use on all computers. Oftentimes, I learn as much from the comments as I do from the hints -- so if you have a better way, please feel free to post a constructive comment.

I use three Macs: one at work, and two more at home. Having access to the same bookmarks on all machines is really useful to me. I considered MobileMe, but it was not free. I considered xMarks, which seems to work well, but I'm concerned about the privacy of my bookmarks / passwords (read their privacy policy). I have my own server, so this solution is available to me. If you do not have your own server, then you will probably want to consider xMarks or MobileMe for keeping your bookmarks in sync. Also, if you don't have your own server, it is likely that you can more easily justify the expense of the MobileMe account (and therefore, this hint does not apply to you).

Again, this is not a true sync, but rather a way to have 1 set of bookmarks that integrates with your Safari browser.

Prerequisites:

Run Macfusion, and set it up to mount a directory on your server as a drive. I used the SSHFS (so everything is encrypted in transmission), but you could also choose to use FTPFS. If you have your own server, you should know how to set all of this up, so I won't get into it here. I simply created a new directory on my server called 'Safari' and password protected it. Using Macfusion, It allows me to mount this on my desktop as if it were a drive connected to my machine.

Now, on all of your computers:

Export your bookmarks somewhere safe, and QUIT Safari. Then, Go to ~/Library and make a backup copy of the folder called Safari. I just renamed mine to ~/Library/Safari2.

Next, in Terminal, type:

ln -s PathToNewLocationOnYourServer ~/Library/Safari/

In my case, PathToNewLocationOnYourServer is: /Volumes/Safari, but you can name your new volume whatever you want in Macfusion.

Now, open up Safari. You should notice that the bookmarks reverted back to the defaults. Go ahead and import the bookmarks that you had exported. Or if you want to restore everything (saved passwords, the like) go ahead and copy everything from ~/Library/Safari2 (or whatever you called your backup) to the new location on your server. Be sure to do this while Safari is not running.

That's it!

Caveats:

If you do this, you should make sure that the directory on your server is password protected. Otherwise, you aren't accomplishing one of the goals (privacy). Same applies to using FTP vs SSH.

Also, if the connection to your server is slow, Safari might take longer than normal to shut down.

[crarko adds: I haven't tested this one.]

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20110328182438888