How to preinstall a chrome extension on a linux headless server

谁说我不能喝 提交于 2019-11-30 18:38:33

问题


I need to install a chrome extension on a headless Server. One way is using group policy. I am looking for some other way of doing this.

For Firefox I would just place my XPI ( extension ) in the profile directory/extensions folder and Firefox would pick the extension . I wonder if for chrome I can do something similar.

Thanks.


回答1:


This is exactly what I was looking for. Found the answer here.

http://developer.chrome.com/extensions/external_extensions.html




回答2:


  • If you are installing from a file, make the .crx extension file available to the machine you want to install the extension on.
  • Create a file with the following name in one of the folders listed below: aaaaaaaaaabbbbbbbbbbcccccccccc.json where the file name (without the extension) corresponds to your extension's ID. The location depends on the operating system.

Linux:

/opt/google/chrome/extensions/ /usr/share/google-chrome/extensions/

Note: Use chmod if necessary to make sure that the aaaaaaaaaabbbbbbbbbbcccccccccc.json files are world-readable.

  • Save the JSON file.
  • Launch Google Chrome and go to chrome://extensions; you should see the extension listed.

Reference

  • Hosting


来源:https://stackoverflow.com/questions/15196274/how-to-preinstall-a-chrome-extension-on-a-linux-headless-server

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