Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

HiFiGuy528

macrumors 68000
Original poster
Jul 24, 2008
1,874
64
How to keep Safari bookmarks in sync on two Macs using DropBox. DropBox works very well with keeping 1PassWord in sync.
 

HiFiGuy528

macrumors 68000
Original poster
Jul 24, 2008
1,874
64
Takes a little terminal magic. Open a terminal and run

ln ~/Library/Safari//Bookmarks.plist ~/Dropbox

Run this on the machine that you want to sync the bookmarks from.

then go to the other computer, delete the
~/Library/Safari/Bookmarks.plist file then run

ln ~/Dropbox/Bookmarks.plist ~/Library/Safari/

What this does is create to file heads that point to the same block
chain on the drives. One file head resides in the normal folder, so
when you update your bookmarks, the shared block chain gets updated,
which updates the file in dropbox, and thus syncs the changes to your
second computer.
 

vivarey

macrumors member
May 16, 2007
34
0
Los Angeles
Takes a little terminal magic. Open a terminal and run

ln ~/Library/Safari//Bookmarks.plist ~/Dropbox

Run this on the machine that you want to sync the bookmarks from.

then go to the other computer, delete the
~/Library/Safari/Bookmarks.plist file then run

ln ~/Dropbox/Bookmarks.plist ~/Library/Safari/

What this does is create to file heads that point to the same block
chain on the drives. One file head resides in the normal folder, so
when you update your bookmarks, the shared block chain gets updated,
which updates the file in dropbox, and thus syncs the changes to your
second computer.

Just wondering, how would one undo these symbolic links? Is it as simple as deleting the plist files from both machines?
 

BlueRevolution

macrumors 603
Jul 26, 2004
6,054
2
Montreal, QC
Symbolic links show in Finder with little arrows in the bottom corner, so when you see that you can delete the files without consequences. If you're going in from Terminal, you can run ls -l and symbolic links will show up with a l on the far left side, like so:

lrw-r--r--

Or what have you. You can just rm them like any other file. But yeah, if you don't know what I'm talking about, delete the links in Finder. :D
 

Humble Rat

macrumors newbie
Nov 16, 2009
1
0
A Different Approach.

I didn’t have success with the above suggestion so I found another solution. I’ll outline it below for anyone who stumbles upon this post as I did, nearly a year after its last activity.

The developers of Dropbox are working to add the ability to sync specific files and folders so the following article may soon be obsolete. Check before you bother.

My goal is to sync Safari between a MacBook and a Mac Pro. Using hard links, as described in the post above, resulted in Safari breaking the sync to Dropbox by creating a new Bookmarks.plist file when updating my bookmarks. Thus, removing the relationship between the link in my Dropbox and the Bookmark.plist. The below approach uses symbolic links and points to folders instead of a specific file. It will allow you to restore your history and even open windows if you use the Glims plug-in for Safari. Unfortunately, Safari should be closed before attempting to open a new session on a different computer or you will have to manually merge the data to keep it.

1. The first step is to prepare one set of Safari settings before you propagate them to other computers. You can export any bookmarks you want from the file menu and import them to Safari on the computer with the settings you want. As long as you have the bookmarks imported you can always organize them later. Also, backup your the ~/Library/Safari folder before you continue incase something goes wrong.

2. On the computer you’ve prepared, create a symbolic link in the Dropbox folder that points to the Safari folder in your user's library. In my Dropbox folder I have a folder named "App Sync" to keep it organized but this folder is not necessary.

In terminal:
ln -s ~/Library/Safari ~/Dropbox/App\ Sync/

Note: the "\" tells terminal to ignore the space of "App Sync."

3. On the next computer turn off Dropbox then replace the old ~/Library/Safari folder with the newly synced “Safari” folder in your Dropbox. This will delete all of your old settings so make sure you have everything you need. Also, Safari should be closed while you are doing it.

4. Create another symbolic link as was done in step 1, but on the computer you are currently working on.

In terminal:
ln -s ~/Library/Safari ~/Dropbox/App\ Sync/

5. You’re done! Make sure to close Safari on one computer before you open Safari on the other one. You can always use Firefox if you need to use both browsers.

If you have any tweaks let me know!

Below is the article that informed my approach: http://www.pxc.me.uk/misc/dropbox_mac_use.html.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.