10 March 2011

Multiple User Profiles in Google Chrome for Mac

Creating multiple Google Chrome profiles is fairly easy on a PC, there's even a program for doing all the legwork for you. Not so for the Mac. I could not for the life of me find a decent tutorial on the web for creating multiple user profiles for Google Chrome on OSX, so hopefully this will help. We'll basically be writing a small shell script, which will act like an application for initializing a new Chrome profile and acting like a Windows shortcut thereafter. Here are the steps:

First, open Script Editor (Command Space > Script Editor)

Now, lets say we want to add a new chrome profile for somebody named Susan. Paste the following code into the Script Editor, replace the name "susan" with the profile name you want to use.

do shell script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --user-data-dir=/Users/$USER/Library/Application\\ Support/Google/susan > /dev/null 2>&1 &"

Next, save the Script (File > Save As) in your Application directory. Name it something like "Google Chrome Susan" (replacing Susan with your profile name). Also, make sure to choose "Application" from the File Format drop-down list.

Now you should see a new .app in your Applications folder with the name you gave to the shell script. You can run this application and it should initialize a new profile. Everything should be working now.

If you want to make the new Script/App look a little prettier, you can copy the normal chrome icon to the new .app. To do this first select the regular Chrome Application and select Command I (for Get Info).

See the icon in the top left hand corner of the Info window. Click the icon and select Command C (for Copy). Now go to the new Script/App and Get Info. Now select the icon in the top left and select Command V (for Paste). The icon should change.

Now just close both Info windows, and the app should have a new pretty Chrome icon.

After waiting for Spotlight to index the new app you should be able to search for it without a hitch!

The most helpful contributing source to this post was a Chromium support page: http://www.chromium.org/user-experience/user-data-directory. I also learned about changing application icons from a post on this wiki page: http://wiki.unto.net/google-chrome-profiles-on-osx. Hope this helps.

No comments: