Hello Brave community. I’m using Brave in my mobile phone for a while and it’s great, what it does for blocking to ads is revolutionary. And I decided to use it on Mac as well but there is a slight problem. It records history by default. There is no option like it was on Firefox to not record history and clear on exit as an option and also I couldn’t manage to use the script which makes Chrome to launch in incognito mode by default. This is the code I found and use for Chrome on mac for years and it’s good. Can you help me with this script code to apply it for the Brave?
(For Chrome) Open AppleScript Editor and paste the following script in it:
ifapplication “Google Chrome” is running then
tellapplication “Google Chrome” tomake new window with properties {mode:“incognito”}
else
do shell script “open -a /Applications/Google\ Chrome.app --args --incognito”
@bravethinker, @utts
When you edit the shortcut path, you need two -'s before incognito. Full path should look something like: ~\Brave-Browser\Application\brave.exe"--incognito
Note that there are no spaces between the last quotation mark and the appended --incognito
@Mattches
For me on Windows 10 Home x64 on all chromium base browser, it work as below :
Example … \brave.exe"(space)-incognito
\Brave-Browser\Application\brave.exe" -incognito
Welcome, @bravethinker. So, the command line that works fine in Terminal is:
open -a Brave\ Browser --args --incognito
The "" in “Brave\ Browser” tells the OS that the space is part of the name. I’m going to edit the quote below with how I think your thing will work. The app name is “Brave Browser”
If that doesn’t work, add .app in the shell script line like this: do shell script “open -a /Applications/Brave\ Browser.app --args --incognito”
I don’t think it’s needed since the command line instruction I pasted at the beginning works and doesn’t have it.
Note as edit: I made some edits because I realized that the script Editor had changed every instance of “Brave Browser” to “Brave Browser Dev”. After I fixed that, the Editor puked on the shell script command, so I added .app to it and it works in the Editor, now. Sorry about that. Not much sleep lately. But what appears below should work, now. </end Note as edit>
The double quotes were “smart quotes” apparently inserted by the forum’s editor and Applescript needed single quotes instead of the slash for the shell script command. It took me a while to get the forum editor to not do that, and I’m still not sure exactly what character is initiating the “code” mode since it happened with an indent from Geany (some kind of tab character?), but what I’m pasting below works - just tried it, then copied it from the preview of this post and tried it again, successfully. If it doesn’t, again, then just paste it in the Editor, delete and retype the double and single quotes, and you should be good to go.
if application "Brave Browser" is running then
tell application "Brave Browser" to make new window with properties {mode:"incognito"}
else
do shell script "open -a '/Applications/Brave Browser.app' --args --incognito"
end if
tell application "Brave Browser" to activate
Update: ARGH! The OS keeps putting “Brave Browser Dev” in there! If you download the file, be sure to edit it to change it to “Brave Browser” in all three instances. Hnk’s having a bad code day.
I found two sites that show how to start chrome in incognito by default on Mac.
Not sure about this forum policy about posting links.
I googled:
how to open chrome by default on windows and mac.
how to force google chrome for mac to open in incognito mode.
@utts, thank you. Since the script had worked for @bravethinker for Chrome, I didn’t even bother searching, and it was partly a formatting issue from the community site that caused the initial error. I tried the second search, and the sites that came up mostly describe (for Mac) the script approach above, but this one (https://www.webnots.com/how-to-open-chrome-in-incognito-mode-by-default/) offers modification of Chrome’s .plist file to have it open in incognito by default. I’ll experiment with Brave’s tonight if I have time (and if I can find it :P)
@hnktong, you are welcome. Shame that for Mac it is so complicated for average user like me. W10 it is so easy.
Keep up the good work and thanks for your support.
@utts It’s actually not that much harder than editing the properties of a Windows shortcut or editing the Registry.
@bravethinker, I played with two methods from that site: one using BareBones’ BBEdit (TextWrangler was discontinued, but BBEdit still can do the XML to binary thing for .plists, apparently), and one using the command line. Editing the .plist directly had no effect, but using the command line did force Brave to open in Incognito/Private mode, and it’s easy even for those who don’t know command line/Terminal.
First, copy these instructions into a text document or something, or maybe use another browser to view this page, because you’ll need to Quit Brave. Then, like the page from the link above directs, go into Finder and do Cmd-Space (you could click the Spotlight magnifying glass in the menu bar, too), type Terminal, and hit return. What you should see before you hit return is this (click image to enlarge):
Blockquote
Hi HnkTong
I did the above on my Mac (Mojave 10.14.4) but it crashes Brave. I therefore uninstalled the app using TrashMe and re-installed Brave (latest version as at today, 14APR19) hoping this would fix the problem but Brave or the Mac seems to have this setting stuck in incognito and therefore keeps crashing.
Please, could you tell me how I reverse this in terminal.
Many thanks,
@hnktong many thanks indeed, all good now. Unfortunately, my knowledge in this area is extremely limited (and take full responsibility for any problems that may occur thereafter). I’m happy to give you any info you need if you want to investigate further (as long as I’m not giving out personal info of course).
Again, many thanks,