Setting enable-gamepad-extensions from Chrome command line - google-chrome

I cannot set --enable-gamepad-extensions from the Chrome command line
(WebVR experimental build Version 56.0.2902.0 (64-bit))
Setting --enable-webvr on the command line works fine,
and setting enable-gamepad-extensions from chrome://flags also works fine.
I'm guessing it may be because enable-gamepad-extensions is a three way setting (default/enabled/disabled) rather than just a two way one.
I see that the corresponding entries in the Local State file is
"enabled_labs_experiments":["enable-gamepad-extensions#1","enable-webvr"]
and have tried various experiments based on this, but haven't found a way that works.

The flag was added in about_flags.cc, not in command line chrome_switches.cc. It was also added in content_features.cc as 2-state (enabled/disabled) so you can force it with --enable-features:
chrome.exe --enable-features=GamepadExtensions

Related

How to set proerties for Chrome.exe - Need to replace the shortcut argument

I created a shortcut for Chrome.exe and passed the arguments --disable-web-security --user-data-dir="C:/Chrome dev session"
However the arguments works fine when clicking the shortcuts and able to see the security got disabled.
However i want this change to be permanent....no matter how many shortcuts pointing to the chrome, the arguments should get executed automatically
Does argument can be set in any chrome property files ?
Please advise
Thanks
One Solution is touching the registry. However don't want to touch it and looking for a solution without touching registry
Example,
Firefox to run with the parameters "-p username" when I run "firefox.exe"
https://superuser.com/questions/12230/how-to-set-default-parameters-for-an-application
Run regedit and take a look at the key:
`My Computer\HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command`
Put -p username into the command string at the appropriate place.
Thanks.

How to enable web security in Chrome after disabling it?

I did the __disable-web-security in Terminal on Mac. Do I need to enable it again? Or does it enable by itself after restart?
If I need to enable it again, how do I do that? I searched everywhere, but didn't find.
Go to chrome://version and look at the Command Line. If the command line argument is still there, you should restart chrome and then launch it normally (without the flag).
A bit more context: "Flag" refers to two slightly different concepts in Chrome:
Any command line argument that starts with a -- (as opposed to an argument that names a URL or a file, for example).
The list of toggles available at chrome://flags.
Any arguments added manually to the command line will only persist until you quit Chrome. On the other hand, the toggles set at chrome://flags will persist until they are reset. (To further blur this, invoking chrome://restart will preserve the command line flags.)
This particular flag makes its presence fairly obvious, with a banner:
You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer.
So it should hopefully be clear whether the flag is present (and also why this is the sort of flag that can't be persisted at chrome://flags).
The flags set in #2 are delimited in Chrome's command line by the --flags-switches-begin…--flags-switches-end section. Arguments outside of that section are coming from somewhere other than chrome://flags (namely, from the command line, except in the case of Chrome OS and Android, which have their own startup procedures).

Prevent opening Visual Studio Code when click Show In Folder in Chrome

I've been googling and fighting this for a half a day already.
When I download something in Google Chrome I want to go to the folder with a file. But when I press 'Show in folder' a Visual Studio Code starts instead of my Thunar. How can I fix this?
Firefox opens folders ok but Chromium, Google-Chrome and Opera kicks of Visual Studio Code.
My system is Linux Mint Tara. I've already tried some things. Like added
[Default Applications]
inode/directory=Thunar.desktop
to /home/[user]/.config/mimeapps.list
Completely removed code.desktop from /usr/share/applications/mimeinfo.cache
Ran xdg-mime default Thunar.desktop inode/directory and the output of xdg-mime query default inode/directory is Thunar.desktop!!!
Even fully removed code.desktop from filesystem. Nothing worked!
Please help, this annoys me so much.
This is caused by MimeType=text/plain;inode/directory; which can be found in /usr/share/applications/code.desktop for what I can find.
What fixed it for me is changing this line to MimeType=text/plain; and removing code.desktop from /usr/share/applications/mimelist.cache
EDIT
A more permanent solution i've found is the following.
add inode/directory=org.gnome.Nautilus.desktop to the ~/.local/share/applications/mimeapps.list file.
After doing this make sure to the inode/directory entry is the same or not present at all in ~/.local/share/applications/mimelist.cache' and /usr/share/applications/mimelist.cache
org.gnome.Nautilus.desktop can be replaced by your preferred file explorer if you don't use Nautilus.
You might need to restart your desktop environment for the changes to apply.
The solution is simpler,
What happens is that the system orders the directory opening preferences.
Just go to the file manager > select a folder > right click > open with another application > select the file manager.
This will update the opening preferences for the directories.
Finally found! it. I had to delete
inode/directory; /usr/share/code/code --new-window %s; test=test -n "$DISPLAY"
line in the /etc/mailcap file. Bingo!
Chromium related browsers seems to not respect xdg settings on not full-fledged Desktop environments like i3wm which I use. Because the problem was not reproducible when I logged in with xfce4 session.

enable Chrome flags from the command line

I want to enable a flag (enable-token-binding) while launching chrome.
I can do that using chrome://flags page. but for running tests I need to do it from command line.
I tried
chrome --enable-features=token-binding
chrome --enable-token-binding
None of them worked.
go to chrome://version
Find the command line arguments:
Command Line /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --enable-audio-service-sandbox --flag-switches-begin --enable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies --flag-switches-end --enable-audio-service-sandbox
Run the above command with all the arguments and your chrome instance would have all the settings preset.
Try --flag-switches-begin --enable-token-binding --flag-switches-end.
The patter is --flag-switches start and ends capping the flags. Then the names of the flags provided as the parameters within with -- prefixed to them.
Token Binding was removed in Chrome release 70
see https://www.chromestatus.com/feature/5097603234529280
mayankSinha's answer works for the flags he mentions. Note the changed naming convention though: "lower case split by -" convention gets changed to CamelCase.
i.e. same-site-by-default-cookies (as shown in chrome://flags) becomes SameSiteByDefaultCookies

Unable to enable-experimental-web-platform-features by command line for chrome

I am not able to enable-experimental-web-platform-features flag by command line. I am using different user profile which is not the default one of chrome.
I am doing this by following:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
--user-data-dir=D:/dev/chrome/profiles/sahi0 --enable-experimental-web-platform-features --incognito
From a comment by the OP:
Turns out it was working, but it was not replicated in chrome flags. So I was under impression that it's not working at all.
One cannot evaluate whether these items are working by looking only at chrome://flags; one needs to test actual functionality in practice.