I love finding new productivity gems like this that shave minutes off daily mundane tasks. My partner just introduced me to the concept of fast user switching to flip back and forth between users on my Mac and I can’t believe I didn’t know about this feature until now. Here’s the specific situation and why this technique is so great:
Situation: Right now the JumpBoxes we release require manual testing (ie. we have not yet built up a set of automated tests we can run against them). So each time we release a new round of applications, we need to manually extract them to our desktop and fire them up under VMware or Parallels and make sure they work properly.
Problem: The downloads themselves are relatively small (~130MB) but extracted, they consume 2.8GB of disk space. This in itself is not a problem as I only test one at a time but all our laptops run the Mirra backup client which archives every bit of data in our home directories to a backup server. We needed a way to exclude the JumpBox test applications from getting picked up by the Mirra. There may be a way to do it from within the Mirra client itself but even that scenario has issues as the tests are truly sandboxed in an environment where they can’t overwrite something important. We came up with the notion of creating a separate user and running them in that context. The only trouble with that is you lose your daily environment so things you rely upon like your IM, Skype, Music, browser prefs, etc. just aren’t there plus you don’t have access to the files in your home directory.
Solution: Fast user switching allows you to flip instantly between users and continue running whatever processes you initiated under the other account in the background. It treats it almost like you have a KVM to two different computers yet the performance hit is negligible (ie. not like running another computer, for me it was only the extra RAM required by the JumpBox).
Available RAM before user switching:
Available RAM after user switching running 256MB RAM JumpBox in other user’s account:
So this scenario is the best of both worlds because you can sandbox your test environment under a test user, turn on the JumpBox, get the IP and then flip back to your normal environment to do all your testing.
This is how you enable this capability under OSX:
Open your System Prefs and choose Accounts
Make sure you’ve unlocked it to make changes then choose Login Options
Check the option to enable it
Now your username will appear in the upper-right of your screen and you can easily flip back and forth
Thank you Apple for making this stuff work the way it should.