How to run Chromium with incognito flag as default?

Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
I had to use Automator to make an application to run a custom AppleScript to launch Brave for me in incognito mode. Create a new Automator action to save as an Application; add the action Run AppleScript. The script that I had to use for Brave is as follows (modified for Chromium):

Code:
on run {input, parameters}
 
    (do shell script "open -a /Applications/Chromium.app --args -incognito")
 
    return input
end run

Click on the Play icon to test it. If it works, save it. Going forward, you'll run this app you just made instead of Chromium directly. This app will simply launch Chromium in incognito mode.

EDIT: here's some more reading where several people have posted various script options.
 
Last edited:
OP
F
Joined
Feb 20, 2022
Messages
2
Reaction score
0
Points
1
Thank you. Athough that's not quite exactly what I wanted.

On Linux, e.g. in KDE Plasma you can modify/add parameters to each app via a desktop file.

Anyway, do you have an idea how can I change the icon of that automator script file so it has the icon of Chromium, so I can add it to the dock and it will have the Chromium icon?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,614
Reaction score
1,079
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Try these directions. Read the article first because there are steps listed that you should be able to skip. How to Change Mac OS X Icons
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Thank you. Athough that's not quite exactly what I wanted.

On Linux, e.g. in KDE Plasma you can modify/add parameters to each app via a desktop file.

Anyway, do you have an idea how can I change the icon of that automator script file so it has the icon of Chromium, so I can add it to the dock and it will have the Chromium icon?

Yes, I realize that would be ideal, but there is no way to do this in macOS that I’ve ever read of. In Windows, yep you can also and I used to do the same to pass arguments for games.

For icons, Sly provided a link with several ways to do this. If you want a custom icon that looks different from the standard one, you can check macosicons.com for something if you’d like. Easiest thing to do is open the Get Info page for the Automator app you make and drag the ICNS file onto the icon in the top left. Alternatively, open app’s package, find the existing generic icon file, and replace that.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top