How to sync locally hosted Greasemonkey scripts across multiple machines?
Asked Answered
B

1

13

I wish to have access to my Greasemonkey scripts across all machines I use. I already enabled the 'Enable Firefox Sync for User Scripts' setting on Greasemonkey's settings dialog, but then I read that it only syncs externally hosted scripts.

Then I attempted to set up synching with the following method:

  1. I moved Greasemonkey's 'gm_scripts' folder (located in %appdata%\Mozilla\Firefox\Profiles\<profile name>) to a OneDrive folder.
  2. I created a symlink in the original place pointing to the OneDrive folder mentioned above: mklink /D gm_scripts "%userprofile%\SkyDrive\App Profile Synching\GreaseMonkey\gm_scripts"
  3. I set up the same symlink on another machine, and checked that the symlink works.

As a result, my scripts continue to show up fine in the original machine. But they don't show up at all on the second machine. This seems to indicate that Greasemonkey have some script list in another location.

How can I solve this issue, or what other methods are available to implement the syncing of my own Greasemonkey scripts across multiple machines?

Bacchanalia answered 17/2, 2015 at 10:42 Comment(2)
Pretty sure that id you use Firefox's standard profile synching (Not that OneDrive stuff), that all your GM scripts and their data are synched. Haven't tested this in a long while though.Kabuki
@BrockAdams: I tried to use the 'Enable Firefox Sync for User Scripts' feature, but it doesn't seem to support locally hosted userscripts; only externally hosted ones, which have a URL associated. This is a problem for me, because I create my userscripts for our corporate intranet solutions, and I would prefer not to host the scripts externally for that reason (they wouldn't be interesting to others anyway). On the other hand, I have found the originally presented method working, and answered my question. If you have any further information/correction, don't hesitate to add. :)Bacchanalia
B
6

Just to follow up: The original method presented in the question ended up working perfectly fine, after explicitly setting up the 'gm_scripts' folder as 'available offline'. I am now using this method for approximately a month, and the edited scripts are syncing quickly, without any hiccups, between two machines.

So, my initial suspicion of Greasemonkey storing some configuration data in another place proved to be false (or it is irrelevant for the purpose of syncing).

Consequently: If anyone is looking for a syncing method of their own, locally hosted userscripts (which, AFAIK, are not supported in Greasemonkey's Firefox profile syncing feature):

  • Moving the 'gm_scripts' folder to a cloud storage folder, and setting up symlinks in the original place is a working solution.

Important: The only scenario tested and found working in this Q/A is when the 'gm_scripts' folder only contains locally stored userscripts, and Greasemonkey's Firefox profile syncing feature is turned off. I have not tested what happens if the 'gm_scripts' folder contains both locally stored userscripts and copies of externally hosted userscripts.

Bacchanalia answered 23/3, 2015 at 10:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.