After adding ExtensionInstallSources preference with my URL to Chrome Preferences, still won't allow installing “.crx” packaged app

久未见 提交于 2019-12-21 21:20:05

问题


I added the preference ExtensionInstallSources (as per: http://www.chromium.org/administrators/policy-list-3#ExtensionInstallSources ), it still is not allowing me to install my "app.crx" from my URL. I added it as follows:

File: /home/myuser/.config/google-chrome/Default/Preferences

"extensions": {
    "ExtensionInstallSources": [ "http://myurl.com/*" ],
...elided...

Yet, when I go to the url http://myurl.com/myapp/app.crx it tells me it cannot install from that url. How do I fix this?

MORE INFO:

It appears that Preferences file is not the correct one to edit. I downloaded an example on from here: http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip as specified here: http://support.google.com/chrome/a/bin/answer.py?hl=en&answer=187945

That provides a "chrome.json" file but does not specify where to install this. I tried installing it in the .config/chrome/Default folder but that doesn't work.

My chrome.js file is:

// Policy template for Linux.
// Uncomment the policies you wish to activate and change their values to
// something useful for your case. The provided values are for reference only
// and do not provide meaningful defaults!
{
    "ExtensionInstallSources": ["http://myurl.lamp/*"]
}

It still does not work!

2ND UPDATE:

I put the setting in /etc/opt/chrome/policies/managed/test_policy.json as specified here: http://www.chromium.org/administrators/linux-quick-start and it still does not work!

3RD UPDATE:

I checked chrome://policy and it shows the permission is there! It still won't let me install crx's from the URL though! It shows the value for ExtensionInstallSources is:

http://myurl.lamp/*,http://localhost/*,http://192.168.1.109/*,*://myurl.lamp/*,file:///*

But none of those work!


回答1:


I just tried this using chrome unstable (35.0.1908.4) in a test ubuntu virtual machine and it worked fine. Did you restart chrome after changing the policy file?



来源:https://stackoverflow.com/questions/16489013/after-adding-extensioninstallsources-preference-with-my-url-to-chrome-preference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!