Reverting Changes To brave-browser.desktop

Hi All,

I have been seeing this issue for a while. I want Brave to start in incognito mode by default. I modified brave-browser.desktop and changed the EXEC line to
/usr/bin/brave-browser-stable --incognito %U

Sometime later the file reverted to: /usr/bin/brave-browser-stable %U

So I changed it again. Same thing, after a period of time back to the default.

I even tried setting the file to read only for all users/groups

Did not make a difference.

After paying closer attention, I think this is happening when Brave auto-updates.

Am I missing something?

Version 1.71.123 Chromium: 130.0.6723.116 (Official Build) (64-bit) https://brave.com/latest/)

Ubuntu 24.04.1 LTS
Kernel 6.8.0-48-generic
All auto-update to latest versions

YetAnotherForumAcct

You have arrived. Applause. Nightlights. Fireworks. Etc.

Meanwhile, back at the ranch . . .

I do not have a Linux machine available, and I’m not quite sure if “brave” or “brave-browser” is the correct process, here. But, the remaining command line character strings for each, are the same, after the process name:

brave -n --args --disable-gpu --enable-leak-detection --crash-on-failure --incognito

brave-browser -n --args --disable-gpu --enable-leak-detection --crash-on-failure --incognito

Pick and choose the flag(s) of interest.

Thank you for your time and response. According to the docs, this would be correct for linux:
brave-browser-stable --incognito %U
Which is what I have set. The “–incognito” keeps being removed. Possibly upon a browser update.

Using command line flags in Brave Browser

Important tip:

brave://version

There, scroll down to “Command Line”

Copy-and-Paste that particular content into a text editor, and organize all that in order to see all the command line flags.

For example, on my Mac, I have;

/Applications/Brave Browser.app/Contents/MacOS/Brave Browser

--disable-client-side-phishing-detection
--disable-domain-reliability
--enable-dom-distiller
--component-updater=url-source=https://go-updater.brave.com/extensions
(etc.)
--variations-server-url=https://variations.brave.com/seed
(etc.)
--flag-switches-begin
(etc.)
--flag-switches-end

When you start up by using the command line, your command line string (selected flags) will show within the Command Line content, at:

brave//version

Thanks to all who have replied. My issue is not with adding command line parameters. Rather it is after some period of time, the parameters dispensary from the file. In Linux that file is: /usr/share/applications/brave-browser.desktop. The line in question is: Exec=/usr/bin/brave-browser-stable --incognito %U

The --incognito will dissapear. I believe this is happening when Brave autoupdates.

Is this expected? What is the best way to prevent it?

If you’re using a desktop entry given by default upon installing the browser, perhaps it updates every time the browser updates. If that was the case, you should try creating your own desktop entry with the Exec parameter you need (i. e. Exec=/usr/bin/brave-browser-stable --incognito %U) and you can even assign a custom icon to it. You can launch Brave from there and it won’t change unless the command line arguments change for Brave.

@YetAnotherForumAcct ,

What @eddymexico wrote, and How to create a custom startup file:


Similar issue for @markp2020 , here:

“periodically have this issue rear its ugly head upon a new update of the Brave software (ie, the Brave software update overwrites my customizations)”


OEM Factory Built brave-browser.desktop file:

https://github.com/flathub/com.brave.Browser/blob/master/brave-browser.desktop


Standard MIME tools

Example:

xdg-settings set default-web-browser brave-browser.desktop

Maybe, some help there, using the “xdg-settings set _____”

Interesting solution. Let me play with that a bit.

Thanks