Chromium command line switches

Hi all, :waving_hand:

On my Linux Lite system I once in a while need to run google-chrome in a sandboxed environment with firejail´s private option:

firejail --private google-chrome.

This is equal to running the browser for the very first time, exactly like a fresh install of it.

Accordingly I´m presented with the welcome procedure of google-chrome. It asks me whether to set it as a default browser (which I don´t want to) and a variety of other things.
Going through that procedure every time is rather annoying. :angry:
So I was asking myself whether there would be a command-line option of google chrome allowing me to circumvent this procedure.

And indeed there is :smiley: :

(But the man-pages wouldn´t tell me about it.)

Chrome does have command-line flags that can help skip or disable the first-run setup process. The most relevant one for my case is:

--no-first-run

This flag tells Chrome to skip the “first run” tasks (like setting up the profile, default browser prompt, etc.).
So my command would look like:

firejail --private google-chrome --no-first-run

Or if you’re using Chromium instead of the Google-branded Chrome:

firejail --private chromium-browser --no-first-run

Optional: Suppress default browser prompt

If --no-first-run doesn’t suppress everything (e.g., the default browser prompt), you might also want to add:

--no-default-browser-check

So the full command would be:

firejail --private google-chrome --no-first-run --no-default-browser-check

Works perfectly for me. :blush:

All this, and much more, is documented here:

Peter Beverloo´s page is kind of a hidden gem for Chromium tinkerers and I hereby want to share the information with you.
Perhaps it might come in handy at some time. :wink:

Many greetings from Rosika :slightly_smiling_face:

5 Likes

Hi, @Rosika

I don’t use firejail, but I did have things I wanted to change in Ungoogled Chromium on Linux Mint when I first installed it. I used the flags/switches page to select/deselect which ones I wanted and did not want. I found an extensive list here.

You have to go to: chrome://flags and from there choose the options you need.

Sheila

4 Likes

Hi Sheila, :waving_hand:

thanks for providing the additional link.

They also mention --no-default-browser-check as an option, which is great.
Alas, --no-first-run doesn´t seem to be part of the collection.

But it´s certainly worth taking a look at. :+1:

Many greetings from Rosika :slightly_smiling_face:

2 Likes

Nice! It works great on openSUSE Leap 15.6 (after adding the user[s] to the group ‘firejail’ and rebooting).
I added the following alias to: ~/.bashrc
alias chromium='firejail --private chromium-browser --no-first-run --no-default-browser-check'
Now typing chromium will do. :slight_smile:

3 Likes