I'm trying to open google chrome mac with disabled security with the command line

open -a Google\ Chrome --args --disable-web-security

However it keeps opening up parallels windows chrome instead - how do I remove the parallels binding for chrome so that it doesn't open from mac terminal?

up vote 4 down vote accepted

Use the full path to the application:

open -a /Applications/Google\ Chrome --args --disable-web-security

Parallels creates folders in ~/Applications for each virtual machine. These folders contain aliases for applications on the virtual machine. My guess is that the command "open -a" is searching the folder ~/Applications before searching the folder /Applications. This is probably desired behavior in many cases - open would find the application installed for the user before finding the application installed system-wide. However, it's causing some confusion in this case.

I couldn't find documentation explaining which path "open" is actually searching, so this is just a guess. However, specifying the full path to the application works for me.

I had this issue while trying to launch the Chrome debugging tools from React Native. Because React was launching the app I couldn't adjust the command it issues as described in the accepted answer.

I fixed it by changing the bundle name in the Parallels application package so it was different than the Mac Chrome version. To do this find the application package for Chrome in Parallels - I found mine in ~/Applications (Parallels).

Right-click on the Chrome application in Finder and select Show Package Contents. Under the Contents folder you should find a Info.plist file. Open this in a text editor and modify the string value for the CFBundleName key to something else (I used "Google Chrome Win").

Save the file and the open command should launch the Mac version of Chrome as expected from then on.

  • 1
    I also do this - changing the bundle name in the Parallels application pacakge to differ from the native Mac version. In my case, for Outlook - I have Outlook for MacOS installed, as well as Outlook for Windows installed in the guest. <BR/> Note, however, that it is necessary to redo this every time you upgrade Parallels and reinstall the Parallels Tools. – Krazy Glew Dec 23 '16 at 19:39

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.