I want to switch Google Chrome profile with a key trigger. Is it possible to do? please advice
What do you mean by “switch chrome browser to a specific browser”?
@peternlewis
Sorry what i mean was specific profile
Hey @abbas_zahid,
A fair amount can be done with Chrome from the command line.
Here's one example:
Change User Profile In Google Chrome.kmmacros (2.5 KB)
NOTE – I'm not sure the current profile can be changed in the Front window via this method – but it's worth investigating.
-Chris
@ccstone kinda works, but doesn't switch to specific profile correctly I have a pofile name TEST but it doesn’t switch to it.
Hey @abbas_zahid,
Your profiles are not necessarily named the way you think they are. Look in here
~/Library/Application Support/Google/Chrome/
Use the Spotlight search field in the Finder to search for your profile name and look for any “Preferences” files you find.
~/Library/Application Support/Google/Chrome/Default/Preferences
My main profile is NOT named “Default”...
~/Library/Application Support/Google/Chrome/Profile 1/Preferences
My other profile is NOT named “Profile 1”...
So – you have to do a little detective work.
-Chris
Here we are 5 years later and this answer is still very helpful. I was needing to do this same thing. Open up Google Chrome using a specific profile and navigating to a specific URL. @ccstone was right that it took some detective work to find the right profile in the Google/Chrome
directory (as I have many), but I was able to determine which Preferences
file had the email associated with the profile I wanted, that gave me the profile folder name I needed, which allowed me to get the terminal code to work. I now have my Automation running smoothing. Thank you, @ccstone! (I have even copied your credit text into my macro for credit
Here's the code if anyone needs it in the future:
#!/usr/bin/env bash
# ----------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2018/04/28 04:32
# dMod: 2018/04/28 04:32
# Appl: Google Chrome
# Task: Open URLs in Specific Profile Windows.
# Tags: @Shell, @Script, @Open, @URLs, @Specific, @Profile, @Windows
# ----------------------------------------------------------------------------------------
# Location of Chrome's app support folder:
# /Users/username/Library/Application Support/Google/Chrome
# ----------------------------------------------------------------------------------------
open -na 'Google Chrome' --args --new-window --profile-directory='Profile 4' 'https://thechristianchain.org'
Seems easier to select from the "Profiles" menu.
That's how I do it for the equivalent "People" menu in Brave Browser (another member of the Chromium browser family). It works perfectly.