8

I'm running Google Chrome (12.0.742.122) on OS X (Snow Leopard) and I need to pass the "--allow-files-access-from-files" option so that I can test some local javascript stuff I'm working on.

I've tried using the following command-line approaches:

/Applications/Google\ Chrome.app/Content/MacOS/Google\ Chrome --allow-files-access-from-files

open /Applications/Google\ Chrome.app/Content/MacOS/Google\ Chrome -n --args --allow-files-access-from-files

Both will launch Google Chrome but it doesn't seem to take the argument as I am still not able to test my local Javascript.

Any suggestions?

1 Answer 1

6
open -a "Google Chrome" --args --allow-file-access-from-files

I don't know how to adequately test the --allow-file-access-from-files switch, but it works for --incognito for me (same version and OS).

It appears as though Chrome does not like to be opened twice; when passing the -n switch to open (which is supposed to open a new instance), it immediately kills itself.

EDIT: 'allow-files-access-from-files' should be 'allow-file-access-from-files'

5
  • still doesn't work for me.
    – codecraig
    Jul 13, 2011 at 0:50
  • Does the incognito switch work?
    – mbauman
    Jul 13, 2011 at 0:51
  • I just did a system restart (had some updates to install) and now Chrome is working. thanks.
    – codecraig
    Jul 13, 2011 at 0:55
  • 1
    FYI - it's actually open -a "Google Chrome" --args --allow-file-access-from-files. You have an extra 's' in there.
    – w3rthl3ss
    May 15, 2014 at 13:49
  • @w3rthl3ss what is this witchcraft? I typed that exact command (although with a different option) and got unrecognized option but when I copy/paste your command and replace the option with mine, it works! I have two commands right next to each other, they look identical, but only one of them works!
    – Michael
    Jan 19, 2018 at 23:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .