Sunday, May 23, 2010

Multiple Accounts in a Single Browser

Most popular web 2.0 services, whether they provide webmail (e.g. Gmail, Yahoo Mail), social networking (e.g. Facebook, LinkedIn), microblogging (e.g. Twitter, Tumblr), or anything else, use cookies to keep you signed in from visit to visit.
This is very convenient, and saves you the trouble of having to log in every time you go to their website. Almost of them fail to support keeping more than one account logged in at time from the same computer. This is somewhat understandable, since they don't want a user to remain logged in while others are using the computer (which is why they have that 'Remember me' checkbox, which you really shouldn't check when logging in from a public computer). However, what about those of us who actually know what we're doing, and want override this behaviour? What if I have more than one Gmail account, or Twitter account, and I want to use them without having to log in again every time I switch accounts? And what if I really do trust my wife, but still want to keep separate Facebook accounts? For a long while, I used multiple browsers for this. I would log into my personal mailbox from Firefox, and into my work mailbox from Opera, or Chrome, or whatever. It solves the biggest issue (each browser remains logged in, and you can view both accounts simultaneously), but it's not an ideal solution, because I didn't get to use my browser of choice, I was still limited to 3-4 accounts of every web service, and I had to remember which account is logged in at which browser.
Fortunately, there's a much more elegant solution, if your browser of preference is Firefox or Chrome (I haven't researched others), and that is why I am writing this post:

Easily Access Multiple Accounts in Firefox

  1. Run Firefox once with the -ProfileManager command line switch. You can simply edit the shortcut you're already using, and add "-ProfileManager" at the end of the command:
  2. Create however many profiles you want to use, and give them meaningful names, such as '', 'dad', etc.
  3. Create a separate shortcut for each profile you want to use:
    1. Decide which profile you want as your main profile. This profile is the one where external links will be opened (for example if someone sends you a link in Skype). For the shortcut of this profile, simply add the command line switch "-P", followed by the profile name (make sure there's a space between the switch and the profile name):
    2. For each additional profile shortcut, also add the switch "-no-remote". This tells Firefox to ignore that profile when looking for a browser to open external links, and this is the trick which allows you to have multiple profiles open at the same time:

Easily Access Multiple Accounts in Google Chrome or Chromium

  1. For every profile, except your main profile, create a directory. These directories can be placed anywhere and can be named anything, but I recommend using meaningful names. I will use "C:\ChromeProfiles\Buck" as an example.
  2. Create a shortcut for each profile you want to use:
    1. For your main profile you can use your existing shortcut, without any changes. I believe Chrome will use this one to open external links (for example if someone sends you a link in Skype), but I'm a Firefox user myself and haven't tested this.
    2. For each additional profile, add the command line switch "--user-data-dir=", followed by the path to the directory you created for it (no space between the switch and the path):