Score:3

How do I disable a Chromium flag?

tr flag

I am on Ubuntu desktop 20.04 months ago, while hunting a rogue browser extension, I set the --disable-site-isolation-trials flag for my chromium-browser install.

Problem: many moons later, I cannot figure out how to remove the flag.

Troubleshooting

  • Inside chromium I reset all flags and relaunched chromium, but that had no effect
  • I checked /usr/share/applications/chromium-browser.desktop there isn't a flag setting
    ~/.local/share/applications doesn't have a chromium launcher
  • I check my bashrc and I couldn't find a flags (via alias or exported)
  • I tried export CHROMIUM_USER_FLAGS="--enable-site-isolation-trials" but it is just ignored and the browser continues warning me about --disable-site-isolation-trials

Even more weird -ish:
I ran locate chromium.desktop to find the actual launcher for my chromium

/snap/chromium/2254/bin/chromium.desktop
/snap/chromium/2254/meta/gui/chromium.desktop
/var/lib/snapd/desktop/applications/chromium_chromium.desktop

and confirmed that there are zero flags set via the launcher(s).

root@machine:/snap/bin# grep "Exec=" /snap/chromium/2254/bin/chromium.desktop
Exec=chromium %U
Exec=chromium
Exec=chromium --incognito
Exec=chromium --temp-profile
root@machine:/snap/bin# grep "Exec=" /snap/chromium/2254/meta/gui/chromium.desktop
Exec=chromium %U
Exec=chromium
Exec=chromium --incognito
Exec=chromium --temp-profile
root@machine:/snap/bin# grep "Exec=" /var/lib/snapd/desktop/applications/chromium_chromium.desktop
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium %U
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium --incognito
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium --temp-profile

from there I used the command line to reset all pf chromium's flags:

snap set chromium command.chromium=""

It seems to excute successfully, the actual net result.. is nothing.

And when I check htop it appears /snap/chromium/2254/usr/lib/chromium-browser/chrome is being run with several flags --disable-site-isolation-trials --render-process-limit=10 --disable-feature=TFLiteLanguageDetectEnabled

stumped... where are these flags being read from?

Update:

$ sudo snap get chromium command.chromium
chromium

Also I need to correct my comment below... I just noticed that an htop filter STILL shows... /snap/chromium/2254/usr/lib/chromium-browser/chrome --disable-site-isolation-trials --render-process-limit=10 --disable-feature=TFLiteLanguageDetectEnabled... my apologies, guess I was looking at the wrong line of output..

muru avatar
us flag
What's the output of `declare -p CHROMIUM_FLAGS`?
nightwatch avatar
tr flag
I finally figured it out... when I switch my chromium from the ppa version to the snap version, chromium-common, chromium-sandbox, and another file was leftover and causing the problem... chromium snap didn't have any flags as I described... but after I finally ran "sudo apt autoremove"... the problem immediately vanished.... fyi `declare -p CHROMIUM_FLAGS` doesn't work, just get `bash: declare: CHROMIUM_FLAGS: not found`
nightwatch avatar
tr flag
Spoke too soon.. I still get the warning about the flags when I start chromium... however when I check `htop` the warnings no longer appear... I am thoroughly confused again...
Score:1
tv flag

There are a couple of additional places where you might set Chromium flags. In order of probability:

Note that the --disable-feature=TFLiteLanguageDetectionEnabled is set by chromium.launcher itself, so the only user defined flags you need to track down are --disable-site-isolation-trials and --render-process-limit=10.

I tried export CHROMIUM_USER_FLAGS="--enable-site-isolation-trials" but it is just ignored

You made a mistake, you meant CHROMIUM_FLAGS, not CHROMIUM_USER_FLAGS.

Sidenote: You can always check out the exact command line used to invoke Chromium in about://version.

nightwatch avatar
tr flag
you just made my evening.. I made a hot pot of tea ready to spend the evening purging chromium from my system... the culprit `$HOME/.chromium-browser.init` It just seems like an oversight that developers give so many ways to add flags neglect to provide a simple way to determine "where" whatever flag is coming from...the `about://version` seems like a great location to add that info.. to avoid this problem... a very maddening week... THANKS A LOT (ps, you beat chatgpt :-P )
nteodosio avatar
tv flag
@nightwatch Great to hear that! Yeah, too many ways to set flags, but `.chromium-browser.init` is a legacy one (IIRC a relic from Debian). I considered dropping it (see discussion at [LP: #1514484](https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1514484)), but then probably many users would be upset...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.