Tuesday, December 28, 2021

Chrome Profiles - Renaming, organizing, migrating, opening pages with specific profiles

Datatalk + Chrome

Google Chrome has profile support, allowing you to use different 'identities' when browsing the web.

A practical example is to use one account to write a blog, and a second account to test the functionality of that blog with a user name.


Creating a Profile

Creating an additional profile is easy:

1. On the right top corner, left of the three-dot 'hamburger' button you'll find your Profile icon. If you have multiple profiles you can switch between them using this button.


2. Click on it. Behind 'Other Profiles' you'll find a cog-wheel, leading you to 'Manage Profiles'

3. You can add, rename and remove profiles from this page, and customize the looks of each profile.


Personalize each profile

Giving each profile different colors makes it easier to keep them apart.

1. Go to Manage Profiles

2. Edit a profile

3. Pick a color combination and an Avatar

3. At the bottom of the screen you find an option to create a shortcut if you want


Here is three times Chrome, using three different profiles and color schemes. 


Open websites with specific profiles

Chrome profiles are stored here: %LOCALAPPDATA%\Google\Chrome\User Data

If you have created several profiles and check that folder, you'll find...

Default - containing your first (default) profile

Profile 1 - a folder containing your first profile

Profile 2 - a folder containing your second profile

etc.

You can open a website using a specific profile using the command line like this:

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --profile-directory="Profile 1" "https://ninelizardsblog.blogspot.com/p/writing-essentials_12.html"


Reusing profile numbers

Unfortunately, Chrome does not use the profile name you use inside Chrome. Also, it will skip folders already used and later removed.

When copying a Touch Portal setup from one machine to another, I ran afoul of Google's numbering scheme, as I had been playing around with profiles on that machine, and my old batch files were referring directly to specific profiles.

My solution (not sure if this is 100% safe, but it worked thus far 😎)

1. Remove all profiles except for the default profile

2. Create the new profiles from within Chrome

3. Exit Chrome

4. You'll end up with a few folders in %LOCALAPPDATA%\Google\Chrome\User Data named like:

Profile 5

Profile 6

etc.

5. Rename these folders to:

Profile 1

Profile 2

etc.

6. Now edit %LOCALAPPDATA%\Google\Chrome\User Data\Local State

Replace everything 'Profile 5' with 'Profile 1'

Replace everything 'Profile 6' with 'Profile 2'

etc.


Using batch files

Instead of directly refering to a profile you could simply use a batch file to launch Chrome with a specific profile and URL. Which is way easier... Sigh.

See how to do that in this post.


Update: Chrome 2023 Refresh...

... introduced stupid pastel colors. Read here how to fix that.


No comments:

Post a Comment