|Making Your Home Folder Portable
by M. Christopher Stevens
We've all done it. You have files for work you've been working on at home, and you've been copying the files back and forth when, you accidentally copy an old file over a new one. Or you get home and realize you're missing a particular font or plug-in that's at the office. Or you really wanted to hear that mp3 of David Hasselhoff singing "Hooked on a Feeling," but it's at home.
Pulled from Panther.
A while back, there was a feature to be integrated into the (then) upcoming release of OSX 10.3. Panther: something called "Home on iPod." Effectively, what it was supposed to do was allow you to put your Home Folder on your iPod (or any other Firewire drive) and take it with you for use on any Mac running Panther or later.
Unfortunately, this feature was pulled from the final release of Panther. Now, we're on 10.4.6, and our accounts are still more-or-less tethered to our machines...
Blast from the past.
Now, though, the current version of OS X is not supported on those "Old World" machines (unless you're using XPostFacto), and hard drives are growing steadily larger, so you might think this kind of info has kind of gone the way of the dodo.
Amusingly enough, the techniques used to relocate the Home folder to a different partition can, with a little tweaking, be adapted to moving your Home folder to a portable hard drive, ready to be used between multiple machines.
Step 1: Prepare for the move.
It may sound a little conservative (I tend to be kind of anal-retentive about these sorts of things), but in order to most effectively transfer the "home account" experience, there are a couple things that you will want to double-check.
Once you have everything you want moved to your Home folder, it's time for the big move.
Step 2: Copy the Home Folder to the external drive.
This would appear to be a fairly simple task; just navigate to your Home folder, then drag-and-drop. Under most circumstances, that would be sufficient. However, there are some instances where system-level files get broken with that sort of setup. using the
Open up Terminal (it's located in Applications>Utilities) and type in "cp -Rp " (don't forget the space afterward). Next, drag your home folder into the Terminal window to grab the path. Then, drag the hard drive icon from your desktop into the Terminal window to have the same effect. Finally, after the final '/' in the line, retype your username, followed by another "/".
The command should look something like this: cp -Rp /Users/username /Volumes/drivename
username should be the name of your Home folder (aka, your "short user name") and drivename should be the name of your hard drive.
Now, rather than just blindly trusting what I'm saying and type in whatever I tell you, let me break down what we just did...
cp – the Unix command to copy
-Rp – the "-" denotes a modifier to the command. "R" allows you to copy the whole folder (directory). "p" preserves as many of the file settings as allowed by their permissions.
/Users/username - this is the source folder.
username/ - this will create a folder with that name on the drive, were in all your Home folder info will be stored. Otherwise, it will all wind up on the root level of the Hard drive, which can be rather inconvenient.
Once all the information has been transferred (this can take a while - I suggest making a nice sandwich), you can quit the Terminal application.
Optional Easy Error-checking.
At this point I recommend navigating to the newly-created Desktop folder on the external drive and creating a new folder named "It worked!" in there. This way, we can see if our next step goes through correctly.
Step 3: Moving the location in NetInfo Manager
Note: This "moving" method only works in MacOS X 10.2 through 10.4.11. For use in 10.5 or later, use THIS method, instead.
This is where things get tricky. In order to perform this step, you need the following things:
Once you have all the requirements, it's time to fire up NetInfo Manager.
The first thing you will need to do is click the lock in the lower-left corner. You will be asked for your admin name and password, as you will be mucking about in System settings.
Once you have unlocked the info, use the navigation window to go to />Users>username - where username is your account's short user name.
In the lower window, there will be a listing for "home" that will give a path to the Home folder that resides in the Users folder on your internal drive. To choose a new location, simply highlight the old path, hit Delete on your keyboard, and drag the new Home folder into that field; the path should automatically be entered for you.
Quit NetInfo Manager, choosing to save the information when prompted.
Log out, then log back in as the user you just moved.
If you used my optional Easy Error-check trick in Step 2, the folder you created should be on the Desktop. You should also be able to navigate to the home folder on the external hard drive and it should now have the "house" icon of an active Home folder. If it isn't, log back into NetInfo Manager and try again until it works.
Step 4: Set up the next computer.
Now that you have the first computer set up, either log into another account and unmount it before unplugging the drive, or shut down the computer entirely. Unfortunately, the drive stays mounted even after you log out, and removing a drive without unmounting it can cause data corruption.
Open up the Accounts preference pane, and create a new user. Make all the information the same as the account you're moving: same Name, same short user name, same password, same access. Once you have done that, repeat Step 3 on the new machine.
Good to go
Now, you've got a portable home folder; a "mobile Home," if you will! You can use your own customized workspace on any OS X Computer, PPC or Intel, as long as you follow these two simple rules.
Other than that, though, you can bring your personal OS X experience to any Mac you use, without all that pesky file synchronization.
Now that's pretty darn cool...