How can I open a separate browser session using a separate user data directory from the command line?

I created a copy of my user data directory, and used a command line switch to point to it, but instead of a Brave session with separate bookmarks, profiles, etc., a new window was opened in the existing browser session.

How can this issue be reproduced?

  1. cd ~/.config/BraveSoftware/Brave-Browser
  2. cp -r Default test123
  3. brave --user-data-dir-name=/home//.config/BraveSoftware/Brave-Browser/test123

Expected result: A new Brave session where I can modify bookmarks, etc. without altering the original data directory. This is how it works in Chromium.

Actual result: Brave prints “Opening in existing browser session.” and opens a new window, just like pressing ctrl-n.

Brave Version( check About Brave): Version 1.11.97 Chromium: 84.0.4147.89 (Official Build) unknown (64-bit)

would creating new profile would help you or not

from the menu click create new profile

hope that help and have a nice day

@prprcupofcoffee,
Is there a particular reason that you need to do this via the command line and/or why you don’t create the new profile first in-browser, then reference it by name?

@Mattches,

I want to open a separate browser session via keyboard shortcut in my desktop environment.

If profiles have replaced the use of --user-data-dir-name, that is fine, but I could not find a command-line switch to activate a specific profile.

Thank you.

use this parameter --profile-directory make is =default to load default profile or profile 1 for the secaond one

check this https://superuser.com/questions/377186/how-do-i-start-chrome-using-a-specified-user-profile

it’s chrome but still it’s will work from brave

hope that help and have a nice day

2 Likes

@justsomeone1, the --profile-directory option seems to do what I want.

@Mattches, if the --user-data-dir-name option is not going to do anything, it should be deprecated.

Best regards, and thank you for your suggestions.

glad it work
now for the --user-data first the brave core is chrome based so the core does not change unless chrome change it

to know the full list of chrome command and what --user-data used for check this
https://peter.sh/experiments/chromium-command-line-switches/

hope that help and have a nice day

@justsomeone1,

There is a Brave support article with the command line switches as well:

2 Likes

@prprcupofcoffee thanks for sharing that but i think most of them if not all come from chrome

thanks for sharing the link and have a nice day

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.