79194939

Date: 2024-11-16 10:30:48
Score: 0.5
Natty:
Report link

I was fiddling around this recently and came up with this piece of solution, although I'm still working on a way to make these persist (maybe with a daemon of sorts?).

Google Chrome and friends and forks have this file called "Local State." I have no idea what exactly that file is responsible for as a whole, knowing there seems to be some sensitive data in there as well, but this block particularly got my interest;

{
  browser: {
    "enabled_labs_experiments": [
      "enable-parallel-downloading@1",
      "ozone-platform-hint@1",
      "wayland-text-input-v3@1"
    ],
    "first_run_finished": true,
    "last_whats_new_version": 131
  }
}

The .browser.enabled_labs_experiments is the path you're looking for here. You can set the flags and their values according to the chrome://flags page.

For example, in the block above, the following flags are set respectively;

Keep in mind that this is an array variable. For example, if you want to replicate the flags I have enabled here on Linux using jq, (assuming your profile is stored in $HOME/.config/google-chrome);

jq '.browser.enabled_labs_experiments = [ "enable-parallel-downloading@1", "ozone-platform-hint@1", "wayland-text-input-v3@1" ]' $HOME/.config/google-chrome/Local\ State > $HOME/.config/google-chrome/localstate.new
mv $HOME/.config/google-chrome/localstate.new $HOME/.config/google-chrome/Local\ State

The new "Local State" file will look drastically different than the original one you had before you launch Chrome. That's normal since it's a JSON file and jq prettifies its output for better human readability. Once you launch Chrome, your new flags will be picked up and the "Local State" file will be modified by Chrome to be in the same format as before.

Other pieces here include;

Side note: I'm not a Google employee but a computer engineering student who fiddles around Linux and similar a lot.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Spring