Choosing a profile from the command line (Linux, flatpak)

I have two different Brave profiles (personal, work), and I want to create different .desktop files to be able to launch them separately (I already do this with Firefox), in order to properly route links through Junction. Brave has a lot of command line parameters, and I’ve searched the internet looking for some clues, to no avail (even here on the community it seems to be a dead-end).

The best clue I found so far was that I should try --profile-directory="<profile>", but to my surprise, it creates a new “Profile 1” profile, and doesn’t switch to <profile> :thinking:

I am on Fedora 36, and Brave is installed as a flatpak. I am running it through

/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory=“Work”

(most likely not the best way to do it :grimace:)

The “Work” profile appears on Brave’s profile manager along with the default (which I renamed to “Personal”)

Any clues on how I can achieve this (seemingly) trivial task will be much appreciated.

Brave Version( check About Brave): v1.44.112

Additional Information:

1 Like

Hey, it’s because weirdly enough the profile names aren’t the same as the name you gave the profile in Brave.

If you go to ~/.config/BraveSoftware/Brave-Browser/ (or wherever you BraveSoftware folder is located) you’ll notice that all your profiles are actually numbered and aren’t named after your profile name.

So you would define your “Work” profile like this:

/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory="Profile x"

Where “x” is the number of the profile allocated to that profile. I’m guessing the order in which the profile was created, so I would just try a few numbers depending on how many profiles you have. For example:

/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory="Profile 1"
/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory="Profile 2"
/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory="Profile 3"
/var/lib/flatpak/exports/bin/com.brave.Browser --profile-directory="Profile 4"

Etc… Until you find your Work profile…

1 Like

Thanks @smile ! That did the trick. One small additional info is that your default profile directory will always be named Default.

This should be better documented somewhere on the official docs, I can’t see why it was so difficult to get to this :roll_eyes:

BTW flatpak Brave stores its user files on ~/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser

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