Many of us have more than one Mac in the house—usually a combination of a desktop and a portable. In my case, I have a Dual G5 desktop system, and a new MacBook (which replaced a PowerBook) that I use when I want to free myself from the tethers of the desk. I try to be relatively energy conscious in our home, and so I’ve got the G5 set to go to sleep after about 10 minutes of inactivity. And that’s where I ran into a problem…
Often when I’m working on the MacBook, I’m accessing Web pages served by the G5, which has Web Sharing enabled in the System Preferences panel. I keep a local copy of macosxhints.com on the G5, as well as a number of open source web applications that I’m playing with. The problem is that, as far as the G5 is concerned, serving Web pages to connected Macs isn’t “using” the machine, so 10 minutes after I start using the MacBook, the G5 stops serving pages—because the machine has gone to sleep!
I could, obviously, change the Energy Saver settings to have the machine not sleep. But that’s a bit of a pain, especially as I often move between the two machines throughout the day. Instead, the solution turns out to be simple, if not entirely obvious.
To prevent a Mac from going to sleep, all you need to do is connect to it via Personal File Sharing. On my G5, I went to the Sharing preferences panel, and made sure Personal Web Sharing was enabled (checked). Now when I want to use the MacBook, the first thing I do his press Command-K (Go -> Go to Server) in the Finder, and enter my G5’s net address (it’s also saved as a favorite). I connect to the home directory on the G5, and that’s all that’s required—I can now do nothing but view web pages served by the G5 without the machine falling asleep 10 minutes into the process.
There are other ways to accomplish this same result, but this seems like the easiest solution to me. Just remember to unmount the shared drive when you want the host machine to go to sleep again. If you don’t, even if you put the “remote” machine (the MacBook, in my example) to sleep, the host machine (G5) will stay awake, thinking someone’s still connected.