Skip to content

Instantly share code, notes, and snippets.

@ciphertxt
Created July 13, 2022 18:42
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Opens a specific Microsoft Edge profile by name on macOS
# Navigate to the profiles directory
cd ~/Library/Application\ Support/Microsoft\ Edge
# List out the profile directories. Note that the directory name is what is used in the launch command, *not* necessarily the friendly name of the profile you see in Microsoft Edge.app
find ./ -type f -name Preferences
# Let's say "Profile 1" is one of our directories
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" --profile-directory="Profile 1"
@amartins5165
Copy link

Unfortunatly, this only works when Edge is closed.

@ciphertxt
Copy link
Author

Unfortunatly, this only works when Edge is closed.

Not sure what's not working for you. Calling "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" --profile-directory="Profile 1" from terminal opens my secondary profile when Edge is already open and running the primary.

@amartins5165
Copy link

My bad, IT WORKS

@amartins5165
Copy link

But it opens a whole new window

@ciphertxt
Copy link
Author

But it opens a whole new window

This is a Chromium/Edge behavior. Not the script. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment