Syncing Two Macs Without .Mac Or MobileMe
Sunday, June 29, 2008, 4:01pm
In addition to my Mac Pro, I now have a 12" Powerbook that I use on the go. Having two computers introduces the hassle of keeping them in sync. Since .Mac comes with a 60 day trial, I decided I'd give it a try. For what it does, it does it well: it kept my mail, bookmarks, calendar and address book in sync, but nothing else.
However, .Mac costs $100 a year and it didn't meet all my needs. It did, however, offer a whole bunch of solutions (in the form of cloud computing) that I didn't want because rather than used someone else's cloud, I'd rather roll my own open source cloud. I don't use flickr, gmail or wordpress.com for this very reason, so why would I want .Mac email, webhosting, galleries, etc? All I really want to do is keep to Macs in sync, including all my documents. I googled and the best I found was Geek Throwdown: How to sync two or more Macs?.
Enter Unison. Here's a quick guide:
- I turned on remote login in system preferences on the PowerBook. This lets me SSH into it, which is a good thing because Unison operates over SSH.
- Installed the OS X binary of Unison onto both machines. (Downloaded the GUI universal binary and then launched the application, from there, within the application I was able to install the text version. Again, I did this for both machines.)
- Logged out of the PowerBook, then SSHed into it from the Mac Pro. I then deleted my entire home directory on the PowerBook (
rm -rf). - I exited all running programs on the Mac Pro except a terminal.
- Created a directory
.unisonin my home directory on my Mac Pro. Inside that directory, I created a filesync.prf. Here's the contents of that file, annotated to explain what each line means:
# Roots of synrchonoization # I want to sync my entire home directory of the Mac Pro, the local machine with root = /Users/brianpuccio # ... my PowerBook, hostname beta, the entire home directory root = ssh://brianpuccio@beta.local//Users/brianpuccio # This synchronizes file modification times times = true # This turns off logging log = false # This tells unison to ignore some files and paths # http://alliance.seas.upenn.edu/~bcpierce/wiki/index.php?n=Main.WikiSandbox ignore = Name .FBCIndex ignore = Name .FBCLockFolder ignore = Name {Cache*,.Trash*,.VolumeIcon.icns,.HSicon,Temporary*,.Temporary*,TheFindByContentFolder} ignore = Name {TheVolumeSettingsFolder,.Metadata,.filler.idsff,.Spotlight,.DS_Store,.CFUserTextEncoding} # ~/.fseventsd/ is owned by root, don't have privledges to this, so ignore it ignore = Name .fseventsd # Unison is also the name of a usenet client http://www.panic.com/unison/ # This ignores its very large and often changing cache, which is fine since I don't use it on the Powerbook ignore = Path {Library/Application Support/Unison/news.usenetserver.com} # This is Mail's cache of my IMAP accounts, since this was large and I kept having Unison crash on the # first few syncs, I omitted this path figuring Mail on the PowerBook would sync once it went online # It worked, so I left it alone and in here ignore = Path {Library/Mail/IMAP-*} # This is my aperture library and it is too big to fit on my PowerBook (and the PowerBook too slow to run Aperture) ignore = Path {Pictures/Aperture Library.aplibrary} # It seems like Unison should automatically ignore its own config folder, but it didn't for me, so I added this ignore = Path .unison - I ran Unison by issuing the command
unison sync(sync because that is the name I cave the preference file,sync.pref. - The GUI launched, asked me for my password on the PowerBook, which I entered. It did a quick comparison (since the PowerBook should have a completely empty home directory) and then listed all the files and directories.
- I made sure that Unison was set to sync each file and directory from the Mac Pro to the Powerbook (Unison uses left and right terminology, e.g., sync file from left to right).
- I clicked Go and it churned along.
For the most part, it worked. All my files were moved over, my keychain and all its passwords, my browsing history and bookmarks, my Adium settings, accounts and chat histories, my Colloquy settings and chat logs, my dock, my background ... quite literally everything.
There are a couple of issues:
- Window positions are copied over. Going from a 1920x1200 screen to a 1024x768 means some windows were too large. A quick window, zoom command fixed those. (But they then get synced back to the Mac Pro, where everything will now launch in the top left of the screen.) I'm just going to accept this.
- Several files (such as
~/Library/Preferences/com.apple.dock.plist,~/Library/Preferences/com.apple.dashboard.plistand~/Library/Preferences/com.apple.finder.plist) are constantly modified by the OS and the very act of logging in to both machines means they both have their timestamps changed, which means Unison doesn't know which one you want to sync to the other, so it displays a ? instead and the default is to do nothing. Of course you can go through each of these one by one (or even en masse) and set that sync to be a Left to Right or Right to Left sync. I'm going to try using theforceoption and either favor a root explicitly or use theneweroption. - Dropping to a terminal to do this (and I do it a few times a week, whenever I shift from one machine to another) is annoying. I'm created an Automator script to run Unison and added it to my dock.
- Typing in my password for every sync is annoying. I now use an SSH key.
- I have only tried this where UIDs and GIDs were the same. Good luck to you if they're different!
I will update this as I make improvements.
¶ Leverage Flickr To Do The Heavy Lifting For Images On Your Drupal Site
Thursday, June 5, 2008, 9:19am
Wouldn’t it be cool if you could upload as many images as you’d like to your site without worrying about your bandwidth? Or even better, if you could automatically share the images you upload to your site with an image sharing service like Flickr, and then have these photos displayed on your website but hosted on Flickr?
That’s exactly what we did last week for the Stand Up Speak Out campaign. Using Drupal and the Flickr API, I created a small Drupal module called Flickrup that does this – all you have to do is enable it and configure it. It helped us easily display photos from many of the thousands of events that took place around the world on their individual event webpages.
¶ flickr Users Not Too Thrilled About Microsoft
Tuesday, February 5, 2008, 9:47am
We, the undersigned, wish you would just leave Flickr alone. OK?
thxkbai
¶ DF Points Out The Interesting Platform Culture Clash Between Yahoo And Microsoft
Saturday, February 2, 2008, 12:33pm
Yahoo's stuff is almost all written in PHP, and runs on FreeBSD and Red Hat Linux servers. I don't think Microsoft has ever bought -- and maintained -- a significant software product that wasn't written against Microsoft technology. E.g., when they bought Hotmail, the migration from FreeBSD/Apache to Windows 2000 was painful and difficult. Hotmail was just one product (albeit a popular one). Yahoo has hundreds of properties, several of them, I'm guessing, more popular than Hotmail was back in 2000.
I was just wondering this on the way home. Microsoft would also own flickr, too, wouldn't they? Interesting to see how that works out.
This also makes me think that if Microsoft can't do it right themselves (msn.com for search) then they'll buy someone else who gets it right.
¶ LOC Crowdsources Via flickr
Friday, February 1, 2008, 12:21am
If you're reading this, then chances are you already know about Web 2.0. Even if you don't know the term itself, you're one of millions worldwide who are actively creating, sharing or benefiting from user-generated content that characterizes Web 2.0 phenomena.
As a communicator, I want to expand the reach of the Library and access to our magnificent collections as far and wide as possible. Of course, there are only so many hours in the day, so many staff in Library offices and so many dollars in the budget. Priorities have to be chosen that will most effectively advance our mission.
That's why it is so exciting to let people know about the launch of a brand-new pilot project the Library of Congress is undertaking with Flickr, the enormously popular photo-sharing site that has been a Web 2.0 innovator.
¶ Yahoo Photos Gives People Back Their Photos
Monday, October 8, 2007, 8:03pm
We will officially close Yahoo! Photos on Thursday, September 20, 2007, at 9 p.m. PDT. Until then, we are offering you the opportunity to move to another photo sharing service (Flickr, KODAK Gallery, Shutterfly, Snapfish, or Photobucket), download your original-resolution photos back to your computer, or buy an archive CD from our featured partner (for users of the New Yahoo! Photos only). All you need to do is tell us what to do with your photos before we close, after which any photos remaining on Yahoo! Photos will be deleted and no longer accessible.
Trusting someone with all of your photos is a big thing, especially considering most computer users aren't too good with managing their data and these online copies may, in fact, be the only existing photos. Kudos to Yahoo for giving everyone ample notice and several easy ways to get their data back.