Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use the new built-in "Users" feature of Chrome to switch between Home/Work accounts easily. However, Chrome remembers the "last" user profile you had selected when launching new windows. This is a problem if I close down my "Home" profile last, because when I then click the Email shortcut on my taskbar, because it goes to mail.mycompany.com using my Home profile, and I'm not logged in.

I'd like to change the shortcut to the company webmail to pass a switch that tells Chrome to always start as the "Default" user, regardless of the last one used.

Note: I have tried user-data-dir, and this seems to do something very different, completely isolated from the Users functionality built in to Chrome. It's possible I'm using it wrong, but please test this before assuming it does the same thing and posting an answer ;-)

share|improve this question
1  
possible duplicate of Make Google chrome with specific user profile as default browser –  Synetech Jul 19 '12 at 19:27
1  
For a Gmail shortcut in Windows: C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe --profile-directory=Default --app=mail.google.com/mail/u/0 –  user148237 Jul 25 '12 at 15:40

6 Answers 6

up vote 44 down vote accepted

The command line argument you're looking for is --profile-directory=Default.

Here's the complete command line for Mac OS X:

open -a "Google Chrome" --args --profile-directory=Default

And for Linux:

google-chrome --profile-directory=Default

It expects the internal names of the profiles: My second profile, named "Lemonade" by Chrome, would be --profile-directory="Profile 1".

Determine the profile name by trial and error, or looking in the Local State file (see Justin Buser's answer).

On Mac OS X, the directories are located in ~/Library/Application Support/Google/Chrome. In Linux they are located in ~/.config/google-chrome. In Win7 they are located in %USERPROFILE%\AppData\Local\Google\Chrome\User Data.

share|improve this answer
1  
Brilliant! I didn't think it was possible (after searching for weeks, even going through the code repo). Great to not have to worry about the order I close the browsers in now :) –  Danny Tuppeny Jan 11 '12 at 13:15
2  
@DannyTuppeny I got it from the source file after a few failed experiments. But you're right, googling for it is definitely difficult as everyone seems to use the other argument... –  Daniel Beck Jan 11 '12 at 14:35
1  
As of Nov 2013 this doesn't seem to work in Chrome for Mac. If all sessions are closed the parameter is honored, but after initial opening Chrome chooses same user profile regardless of parameter. (I run as non-admin user). –  John Faughnan Nov 4 '13 at 4:31
2  
It's always a good idea to use a bundle identifier instead of the app name, as people sometimes rename their apps. (I renamed mine "Chrome" and the command above does open it at all.) open -b com.google.Chrome --args --profile-directory=Default –  interestinglythere Jan 2 at 19:20

GUI method with correct icon

  1. Go to chrome://settings/ (or Menu > Settings)
  2. Scroll down to Users section
  3. Select the currently active profile user & click the Edit button enter image description here
  4. Click Add desktop shortcut enter image description here
  5. To repeat the process for other profiles, first switch to that profile & repeat 1-4

This creates a shortcut icon to your profile with the correct picture in the icon too. You can drag multiple profiles to your Windows taskbar. The shortcut on Windows 7 icon points to

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" for first profile

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1" for next profile.. and so on.

share|improve this answer
    
This was very useful. –  Alexander R. Torrijos Aug 13 at 6:39

Another, albeit less convenient method of choosing which profile will launch is to edit the Local State file in the Chrome User Data directory and search for "last_used": if you change the value it lists to a different Profile that's the one that will open the next time you launch chrome normally (unless of course you're using the switch mentioned above).

I only mention this in case anyone is interested in a more in-depth solution, that Local State file contains a JSON formatted list of settings that some might find useful.

share|improve this answer

--profile-directory is useless if you already have another profile opened or the last window you closed is attributed/was logged in with another profile.

I have app shortcuts with one profile. The apps shortcuts have --profile-directory="Profile 3" plus the --app="..

The default profile shortcut has --profile-directory="Default".

Both profiles get messed up. Extensions and the default shortcut that I use for daily browsing.

share|improve this answer
1  
I've had no issues - I just made sure all my shortcuts have the --profile-directory, so they'll all start with the profile I want :) –  Danny Tuppeny Jan 24 '12 at 19:10
1  
I agree with Danny, you don't know what you're talking about. I have 6 profiles and a shortcut for each on my using this method and I can launch any or all of them regardless of whether or not chrome is already running. –  Justin Buser Jun 13 '12 at 11:53
1  
@JustinBuser can you still do this in chrome 23? After chrome is open for me, I can't seem to launch a new window or change the profile with these switches. –  y3sh Oct 3 '12 at 19:08

I've just tested this with 4 profiles with Chrome Version 22.0.1229.94 m:

Respectfully, I think the confusion is this:

  • If you close all instances of chrome and then launch Chrome with a simple chrome.exe without any switches, then this new instance that is launched will open with the profile of the very last Chrome window/instance that was closed.

  • If however, you click on a shortcut that you've created using the above --profile-directory method, an instance/window with the appropriate login regardless of which window(s)/ instances/ profiles are currently running, and/or which was the last one shutdown.

  • share|improve this answer

    This still works with Chrome Windows as of 4/24/2013. I created a shortcut for each of the 3 profiles I routinely switch between, and I assigned each shortcut a unique "shortcut key".

    One additional nicety -- your profile user icon is in the profile subdirectory, ex: %USERPROFILE%\AppData\Local\Google\Chrome\User Data\Profile 1. I assigned my profile user icon to the windows shortcut.

    I can't reliably put the 3 shortcuts separately on the Win7 taskbar though; win 7 seems to lose count after 2.

    share|improve this answer

    protected by Community Aug 17 '12 at 20:16

    Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

    Would you like to answer one of these unanswered questions instead?

    Not the answer you're looking for? Browse other questions tagged or ask your own question.