I wanted to be able to use the GMail web interface on my work machine, but for privacy reasons, I prefer not to be logged into my Google Account on my main browser.

Here's how I make use of a somewhat hidden Firefox feature to move GMail to a separate browser profile.

Creating a separate profile

The idea behing browser profiles is simple: each profile has separate history, settings, bookmarks, cookies, etc.

To create a new one, simply start Firefox with this option:

firefox -ProfileManager

to display a dialog which allows you to create new profiles:

Once you've created a new "GMail" profile, you can start it up from the profile manager or directly from the command-line:

firefox -no-remote -P GMail

(The -no-remote option ensures that a new browser process is created for it.)

To make this easier, I put the command above in a tiny gmail shell script that lives in my ~/bin/ directory. I can use it to start my "GMail browser" by simply typing gmail.

Tuning privacy settings for 2-step authentication

While I initially kept that browser profile in private browsing mode, this was forcing me to enter my 2-factor authentication credentials every time I started the browser. So to avoid having to use Google Authenticator (or its Firefox OS cousin) every day, I ended up switching to custom privacy settings and enabling all cookies:

It turns out however that there is a Firefox extension which can selectively delete unwanted cookies while keeping useful ones.

Once that add-on is installed and the browser restarted, simply add accounts.google.com to the whitelist and set it to clear cookies when the browser is closed:

Then log into GMail and tick the "Trust this computer" checkbox at the 2-factor prompt:

With these settings, your browsing history will be cleared and you will be logged out of GMail every time you close your browser but will still be able to skip the 2-factor step on that device.

I'm doing the same thing :)
Do you know how can I make the profile folder on a location that I choose? I want it to be on a DOK.

Comment by Anonymous
Anonymous: when you create a new profile in the Profile Manager, there's an option to specify where its folder should be stored I believe.
Comment by François Marier

I have the same problem, but my solution is much simplier.
Normal browsing with mozilla not logged and gmail google+ logged with chromiun.
Thanks for posting!

Comment by nap

François: This option is available only when creating a new profile. No such a thing as "edit" for an existing profile.
I guess I'll have to create a new profile, and then import the important stuff to it. Unless you can think of a better option.

What about performance, should it be a concern when using DOK as the profile folder (read/write speed to/from DOK)?

Comment by Anonymous
I've been doing the same with Facebook for quite a while, although that's more because I don't trust Facebook.
Comment by Alex
Does this work, or does Google/Facebook track IP addresses? And know for example, that only one person (or family) uses a certain IP address 90 percent of the time?
Comment by Anonymous
I use an easier (lazier?) solution. I use Firefox as my main browser, and relegate Chrome exclusively to GMail duties...
Comment by Leon Matthews