Strange behaviour of Google Chrome when started for non-default profile

1

1

I have 3 profiles created in Google Chrome (added from Chrome's GUI, not manually). They work okay, if a new window is opened under different profile from GUI (using user icon in the upper left corner of the window).

I need to start Chrome with specific profile from command line.

According to documentation, it is possible by the command line option --user-data-dir=profile-path-and-name, which is in my case looks like "path-to-windowsxp-user-profile\Local Settings\Application Data\Google\Chrome\User Data\ProfileName".

I added this string into a shortcut. When it runs first time, I get a message box saying that importing data from Mozilla and Chrome is not possible (this might be related to the fact that I have FireFox as well, and it is running, but import is not important to me).

The most important problem is that, when Chrome runs second time (and others), it opens window without current user icon in the upper left corner, and shows a message bar at upper side of the window, stating that Chrome is not default browser.

Moreover, if I open settings from such window, the browsers "says" that this is the only and default profile on the PC. (Of course, if I start the browser without --user-data-dir it shows multiple profiles again, and allows for switching between them using GUI.)

How to fix this?

Stan

Posted 2012-01-09T21:25:36.137

Reputation: 233

Answers

1

It turned out that profiles, added from Chrome UI, are actually user accounts inside the same profile, and they do not work with --user-data-dir parameter in command line as ordinary profiles.

When a new user is created from GUI, Chrome creates a new folder inside User Data directory, for example Profile 1. By default, there is Default folder there, used for default user.

In order to create a fully-functional profile, acceptable for --user-data-dir, one should create a copy of entire User Data directory (including, apart from Default, other subfolders, such as Temp and PepperFlash, and some files in User Data with a local state). This can be done by any file-manager. Also a new empty profile can be created by launching Chrome with --user-data-dir parameter, passing to it a full path to new (non-existent) folder.

Stan

Posted 2012-01-09T21:25:36.137

Reputation: 233

Yo dawg I herd you like profiles… – Aaron Thoma – 2016-11-21T12:52:16.393

To select an 'in-Chrome-user sub-profile': --profile-directory="Default" / --profile-directory="Profile 1" etc.. The part between quotes is the internal profile name, not necessarily equal to the one displayed to the user in the application. (A bit more on that: http://superuser.com/questions/377186/how-do-i-start-chrome-using-a-specified-user-profile/377195#377195 )

– Aaron Thoma – 2016-11-21T12:52:34.327