brianpuccio.net

it's dot com

Syncing Two Macs Without .Mac Or MobileMe

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:

  1. 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.
  2. 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.)
  3. 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).
  4. I exited all running programs on the Mac Pro except a terminal.
  5. Created a directory .unison in my home directory on my Mac Pro. Inside that directory, I created a file sync.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
  6. I ran Unison by issuing the command unison sync (sync because that is the name I cave the preference file, sync.pref.
  7. 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.
  8. 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).
  9. 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:

  1. 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.
  2. 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 the force option and either favor a root explicitly or use the newer option.
  3. 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.
  4. Typing in my password for every sync is annoying. I now use an SSH key.
  5. 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.

Rumors Of Open Source War Greatly Exaggerated

Saturday, April 26, 2008, 10:45am
Drupal, WordPress

The comparison is not just limited to Wordpress Vs Drupal. Things are messing up now and very soon we may see the ultimate CMS Wrestling Fight - Matt Vs Dries. (Thanks, Peter nice post and interesting facts about the founders of these two CMSs.)

These guys are totally against each other. Dries' Mollom may soon offer serious competition to Matt's Akismet. Mobkarma predicts this fight is really going to get more dirtier - wptheme vs druptheme, wpplugins Vs drupmodules and so on. So many bloggers will change sides, lot is going to be written about, lots of blog casualties and much much more disasterous stuff that we can't even imagine.

Drupal is trying to be monopolistic and Dries has other partners in crime. Now, we really don't know what issue they had with Pligg a opensource Digg-clone. Now they have positioned Drigg Vs Pligg. So Dries is your plan - 'all your communities belongs to us". That's a very evil plan.

Hey but wait somebody just called Wordpress destroyer of CPUs. Is that correct Matt?. And, we also know that you are eyeing on to provide a personal twitter alternative. How can you do this Matt, when at one end you say 25% of blogs are spam. We are all watching you Matt, better be careful with your words. You have a big share in the already existing 25% blog spam share and not you would create micro spam blog engines to add further.

What is this guy on?

Om Malik Launches New Site, Switches To Drupal

Tuesday, March 4, 2008, 6:38pm
Drupal, WordPress, om malik, ostatic

The Ostatic blog is really just a wrapper for additional services. The site will also have a directory with key information on each project, including alternatives and links to documentation, forums, mailings lists and the source code itself. Initial data in the director has been added from outsourced writers in India. Going forward, projects can send updates and new content to the site, or add it themselves.

The directory portion of Ostatic is competitive with a number of existing services, including SourceForge, which tracks 170,000 or so projects.

Ostatic also has a "questions and answers" area, similar to Yahoo Answers, where readers can ask questions and get responses from experts.

So is Ostatic built on open source? Yes, say Malik. The platform is built on open source Drupal, and licensed from Vox Holdings.

I think this a case of using the better tool for the job. If you just need to blog and throw on a feature or two, as an afterthought, WordPress is right for you. If you do more advanced things than blog, using Drupal as a CMF is the way to go.

Website Updates

Sunday, June 5, 2005, 9:37am
Drupal, website, WordPress

I've changed the software that runs this website yet again, I'm back to Drupal. While WordPress was simpler and more focused on blogging and design, I still found it lacking. That and I like the development methods of Drupal more as well. I've migrated content, but not all of it. I won't miss it and I doubt many other will either.

Playing With WordPress

Monday, November 22, 2004, 7:39am
Drupal, website, WordPress

So I've changed the software that runs my site to WordPress. I haven't changed much really, just a small tweak to the way categories are listed. I use the default theme, haven't changed anything really, been busy looking at the new landscape. Stuff seems sort of fragmented, but here's what I've found:

WordPress also seems to suffer from comment spam on a greater magnitude than the previous software, Drupal. Rather than delete a dozen or more a day, I've installed CSPAM. So far, I've had it running for a week and no sign of spam. However, I'm pretty sure that if a comment is deemed spam, I don't even get emailed. That means any false positives will be totally unknown to me. Due to the nature of CSPAM, this will have slightly worse than normal repercussions.

Next on my list of things to do is change the look, and I will be using the WordPress Design Sandbox to do so. It allows me to rewrite a template without having to edit the PHP by hand and upload it to the server to see if the changes are what I want. Now I can edit the XHTML and CSS locally, get my site done as I want it, and than just migrate that to the PHP in WordPress on the server.

Hello Again World!

Sunday, October 17, 2004, 9:05pm
website, WordPress

As I've previously mentioned, I've moved this site over to WordPress which I think will suit my needs better.

Hello World!

Tuesday, October 5, 2004, 3:55am
Drupal, website, WordPress

I've decided to stop using Drupal for my website.

Syndicate

Syndicate content

User login