Script to adjust browser connector port (for multiple Zotero instances)

We have Zotero running on a terminal server. As described in this discussion, this requires each user to have their own port listening to the browser connector:
https://forums.zotero.org/discussion/67425/zotero-on-a-windows-terminal-server
We currently set these port number manually and this works fine for 20+ users.

In order to make this running smoothly, it is desirable to create a script that sets the correct settings for each user every time they login on the terminal server (in order to fix any unwanted changes that may spontaneously occur). We are working on such a script and this seems to work nicely for all Zotero settings. However, a more difficult problem is to set the port in the Chrome plugin. We haven't found a way to do this. So far it seems that adjusting settings of Chrome plugins can only be adjusted manually. Does anyone know how we could get a script to change the Chrome plugin setting for the port number?

This is really something we want to have, as we have noted that sometimes the port setting that was set manually in the Chrome plugin changes back to the default port. I do not have a clue why this happens (certainly not all the time and not for all users). When this happens, the setting in Zotero itself is not changed. Perhaps this is linked to updates of the Chrome plugin? Therefore, my second question is: does anyone know why the port setting in the Chrome plugin sometimes changes back to the default?
  • I don't think there's any way you can customize the preference in Chrome with a script. As for the preference reverting, this would be user account/chrome account specific. The Connector stores its preferences in the local extension preference storage. If a user clears their chrome history, cache, etc. they may inadvertently clear the Zotero Connector preferences too, which would include the port customization.
  • Thanks for your input. Is there any documentation that describes where and how the local extensions preferences are stored? Maybe editing these via script might provide a way forward.

    Alternatively, could it be a solution to install a per-user customized version of the Zotero Connector extension in which the default port is adjusted? Obviously this would require Chrome to be setup such that extension installation from a different source is allowed, but perhaps there is a route for that...
  • This is the documentation for the storage APIs, but I don't think there's any APIs to write to specific extension storage. Customized builds are probably going to be too much of a headache to set up and maintain. The Connector frequently receives updates so you'd have to be constantly monitoring the code repo, rebuilding and redeploying.
Sign In or Register to comment.