Home-brewed 'Home folder on iPod' solution

Jun 08, '04 09:43:00AM

Contributed by: Anonymous

I travel a lot and I carry around all my documents and a number of preferences around with me on my iPod. Wherever I go I just connect my iPod to the Mac and work as if on my home computer. It isn't hard to set up in principle but there are a number of little details you need to get right, otherwise you see applications behaving mysteriously.

Major steps:

  1. (Easy) Set up Documents and Library folders on iPod.
  2. (Less obvious) Set up appropriate links from hard disk to iPod.
  3. (Not at all obvious but very important) Arrange that critical apps do not run unless iPod mounted
  4. (Optional) automate opening of favorite documents or apps when iPod is plugged in.
For completeness, I must add that it's terribly important to keep regular backups of the contents of your iPod, but I trust you already know how to do that. The applications I work with on the iPod are: Mail, Address Book, iChat, Safari, DragThing, AppleWorks, and Tous Comptes Faits. Each one is slightly different. If you want to add another application to the list, you'll have to experiment.

[robg adds: This is a long, detailed, and potentially quite dangerous hint if you were to mess up a step or two. Please be sure you know what you're doing before you attempt this, and consider the wear and tear factor on your iPod as well. You are responsible for what you do to your iPod and/or computer, not us ... OK, now that all disclaimers have been applied, feel free to read the rest of the hint...]

OK, now, some step-by-step instructions. I will assume your short login name is me, and your iPod is named MyiPod. When carrying out the following instructions, replace with your actual short login and iPod names. Your iPod preferences must be set to activate as disk. To do this, go into iTunes, click on the iPod icon in the left column, then on the iPod preferences button that now appears in the bottom right corner of the iTunes window (fourth button from the right) and check the activate as disk option.

Be sure you have a proper backup before you go any further. Start Terminal and quit all other applications.

To avoid any ambiguity, I will name folders and files by their full Unix name (as it appears in the Terminal window). So your home folder is called /Users/me/ (also noted as ~/), and your iPod is called /Volumes/MyiPod/. Check the following: while your iPod is plugged in, go to the Terminal and type in ls -F /Volumes followed by the Return key; you should see (among other things) an entry /Volumes/MyiPod/.

  1. The first part is to move your critical documents and preferences from your main computer onto the iPod. Documents are easy (I just move the whole Documents folder; you could do the same with Pictures, etc. Don't put Desktop or Music on the iPod.). For preferences you need to be slightly more selective because some applications will misbehave otherwise.

    Step by step:

  2. The second part is to set up pointers from your home on the hard disk ~/ to the iPod. This is slightly more involved because although some applications work fine with normal aliases, others only work with their Unix equivalent, "symbolic links". You need to go to the Terminal window to set these up. The general recipe for creating a symbolic link is the following: suppose you want ~/foo/bar to stand for /Volumes/MyiPod/me/foo/bar. In the Terminal window you would type the following two lines:
       cd ~/foo/
       ln -s /Volumes/MyiPod/me/foo/bar .
    
    That last line ends with a space and a dot. To create an alias, as you surely already know, you just option-command-drag /Volumes/MyiPod/me/foo/bar into ~/foo/ in the Finder.

    Step by step:

  3. Thanks to the above, Mail, Safari, iChat and Address Book now store their support files on the iPod. Now we must arrange that these applications do not run unless the iPod is mounted, otherwise strange things will happen. (Mail is the most problematic, because it appears to work normally, but it creates a folder /Volumes/MyiPod/ even though the iPod is not present!)

    The easiest approach would probably be to move the above applications from /Applications/ to /Volumes/MyiPod/Applications/. I haven't tried this, because I was concerned about space, and because I noticed that Software Update does not work properly for applications that are not in /Applications/. Instead, because I always start these applications from DragThing using a hotkey, I created aliases in /Volumes/MyiPod/Applications/, and dragged the aliases into DragThing. Thus, when I press a hotkey, DragThing looks for the alias on the iPod and complains if it is not mounted. (I had to play with the preferences of DragThing to stop it from resolving the aliases ahead of time.)

    Now run Mail, Safari, iChat and Address Book. Look for the symptoms of a bad installation noted at the end of this hint. If all is well, you should be able to access your email, bookmarks, buddy lists and address book on every Mac you use.

    For applications that I would not expect to find on a random Mac, for instance AppleWorks or Tous Comptes Faits, I just install them within /Volumes/MyiPod/Applications/.

  4. The last part is to open your favorite applications and documents automatically when the iPod is plugged in. I'll make that the subject of a later hint.
OK, now you have prepared your iPod and made it work on your main computer. Now quit all the above applications, eject the iPod and plug it into another computer. Go back to Part 1: the same files and folders that you moved from your main computer onto the iPod, you must now move to the Trash on the other computer. Repeat Parts 2 and 3. Similarly on every computer you travel to with your iPod.

Here are some symptoms to look for, which may appear if you have done something wrong:

If you want to eject your iPod, you must first quit all the above applications. You must be careful when putting the computer to sleep while these applications are running. It seems the iPod is not immediately available when the computer wakes up, and applications behave strangely if they access their files in the interim. The worst culprit is Mail, which doesn't misbehave in any obvious fashion, but causes things to go wrong later. My solution is to disable automatic sleep in the Energy Savings preference panel, and to quit the above applications when putting the computer to sleep.

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040605051810520