Keep your Safari 5 Extensions synced between your Macs

If you’re running two Macs with Safari 5, keeping your Safari Extensions the same on both computers is a pain in the butt. There’s not much we can do about that until Apple puts in a built-in syncing function, but there is a hack to keep them synced. That said, this isn’t for novices. It requires a bit of tinkering, but it is very doable. I’ll walk you through how I set it up:

First of all, you need a free Dropbox account. Set up your Dropbox applications on both of your Macs. Then, in your Dropbox folder, create a folder called Extensions.

Now, you’ll need to open Automator from your /Applications directory. When the template interface comes up, select Folder Action. Now, in the light grey bar in the panel on the right, click the drop down menu, and then select Other…

Navigate to /YOURHOMEFOLDER/Library/Safari/Extensions, and then press the Choose button.

In the search bar, type “Copy Finder Items,” and then drag the result with that same name into the grey workflow panel on the right.

Make sure the “Replace existing files” button is checked, and then click the drop down menu.

Choose Other…, and then navigate to the Extensions folder you created in your Dropbox directory.

Now go to File > Save As…, and then name this workflow ExtSync1

Screen shot 2010 06 15 at 4.56.16 PM 500x443 Keep your Safari 5 Extensions synced between your Macs

Now, create a new Folder Action. In the light grey bar in the panel on the right, click the drop down menu, and then select Other…

Navigate to the Extensions folder inside of your Dropbox folder, and then press the Choose button.

Type “Open Finder Items” in the search field, and then drag the result of the same name to the grey action panel on the right.

Under the “Open with” drop down menu, select Safari.

Now go to File > Save As, and save it as ExtSync2.

Now, theoretically, all of your Extensions will sync to your Dropbox account, and then it will automatically open the new extensions, and ask you to install them on your second computer.

If you see any mistakes, or if you know of an easier way to accomplish this, please comment on this post, or hit me up on Twitter.

Screen shot 2010 06 15 at 5.10.30 PM 500x443 Keep your Safari 5 Extensions synced between your Macs

  • http://mariusth.channelwood.org/ MariusTh86

    Or you can hit up the terminal and make a softlink (somewhat like an alias) and keep the folder automatically synced without any external help.

    • http://www.macgasm.net Joshua Schnell

      Have any details on that method? We’d love to hear them. :)

      • http://mrturtle.com Luke Hartman

        To use a softlink and have this happen automatically, do the following:

        1. Move your Extensions folder (from /Library/Safari) to your Dropbox folder (/Dropbox by default)
        2. Open up the Terminal application (/Applications/Utilities)
        3. Type the line below

        ln -s ~/Dropbox/Extensions/ ~/Library/Safari/Extensions

        The third step creates a symbolic link (like an alias as MariusTH86 notes) so that when Safari looks for the Extensions folder, it is redirected to the shared folder on Dropbox, which will sync automatically.

        On other computers, first move any extensions not on the first machine from the Extensions folder in Library/Safari/Extensions to the Extensions folder in Dropbox, then delete the folder in Library/Safari/Extensions (if you copy the whole folder as in step 1, you will overwrite the first lot of extensions. Then, type the line from step 3 this second Mac.

        Hope this helps. It’s working so far for me.

  • http://mcdevzone.com/ Mike Cohen

    Just open the terminal and type:

    cd ~/Dropbox
    ln -s ~/Library/Safari/Extensions .

  • http://iamtheunraveler.com Jake

    cd ~/Dropbox
    ln -s ~/Library/Safari/Extensions Extensions

    That will create a symbolic link between your extensions directory and a directory in your Dropbox called “Extensions”. The two folders will sync (actually the latter is just a pointer to the former, but regardless) without you having to do anything.

  • http://robwilkerson.org Rob Wilkerson

    @Joshua

    It’s pretty straightforward. Here’s what I did (your storage location within your Dropbox directory may differ):

    $ mv ~/Library/Safari/Extensions ~/Dropbox/AppSupport/safari
    $ ln -s ~/Dropbox/AppSupport/safari/Extensions Extensions

    That’s it. Dropbox now owns the physical files and happily syncs them while your Safari install just knows to look there when accessing extension info.

  • http://mariusth.channelwood.org MariusTh86

    Alright, first open up the terminal, and enter the following commands

    First go to the dropbox folder where you want the extensions saved:
    cd /path/to/dropbox/

    Then make a soft link from your safari extensions folder to softlinkname inside your dropbox:
    ln -s ~/Library/Safari/Extensions softlinkname

    Now your items are synced over dropbox as soon as you add them to safari, now for the setup on the 2nd Mac:

    Navigate to your safari extensions folder, and remove it (because you’re going to use the softlinked version instead)
    Then open up the terminal and also navigate to the safari folder:
    cd ~/Library/Safari

    Then make a softlink from the folder with your extensions inside your dropbox to the Safari folder and name it Extensions to replace the one you removed:
    ln -s /path/to/dropbox/softlinkname Extensions

    And that’s it, you can now add extensions to either Safari copy and it’ll be automatically synced between computers without any further user interaction required. though probably not for those who are afraid of the terminal ;)
    (Also, I’m not entirely sure how well it will do if you keep both Safari’s open at both computers at the same time.)

    I hope that was a thorough and understandable explanation!

  • http://jasonmadigan.com Jason Madigan

    cd ~/Dropbox
    mkdir SafariExtensions
    cp -r ~/Library/Safari/Extensions/* ~/Dropbox/SafariExtensions/
    ~/Library/Safari/Extensions/
    ln -s /Users/USERNAME/Dropbox/SafariExtensions ~/Library/Safari/Extensions

  • Kyahx

    $ cp -r ~/Library/Safari/Extensions ~/Dropbox/
    $ rm -r ~/Library/Safari/Extensions
    $ ln -s ~/Dropbox/Extensions/ ~/Library/Safari/Extensions

  • Dave Arter

    To symlink your Extensions directory from your Dropbox:

    0. Quit Safari (it might freak out if you mess with the Extensions dir while it’s running)
    1. Open Terminal
    2. cd ~/Library/Safari
    3. mv Extensions Extensions.old
    4. ln -s ~/Dropbox/Extensions .
    5. Done! Fire up Safari and check it worked.

    Note: I’ve not tested this myself.

    • Dave Arter

      Note also: This depends on you having created the Extensions directory inside your Dropbox already, and would obviously need to be run on as many Macs as you want to keep in sync.

  • Pingback: uninteresting :: nerd » Syncing Safari 5 Extensions between Macs using Dropbox.

  • Bmorris110

    is it possible for you to post the automator file and we can configure for our dropbox and system?