How to install greasemonkey user scripts into Firefox by UNIX command line

3

I want to avoid manually navigating using Firefox browser in order to add a Greasemonkey userscript by navigating to that script on a website. That is very cumbersome if I want to add a bunch of new ones to an existing installation. Ideally, I would be able to simply copy an existing script that already is downloaded and just copy it into the Mozilla scripts directory and then reload the web page. Is there some type of option I can use to enable that workflow? I even tried navigating to the script via file://bla/bla/bla/my_user_script.user.js and it loaded it into the page but did not popup the installation dialog box. I'm running Ubuntu Linux.

EDIT: Note the title says "by UNIX command line". I do not want to have to use the mouse to drag and drop things into other things, but instead I should be able to call some script to do it. That way, I can script it instead of having to use the mouse.

bgoodr

Posted 2016-03-05T13:17:02.270

Reputation: 252

Answers

0

To add a script manually to Firefox, make sure it has the ==UserScript== header included and drag it onto any firefox page, it should be recognized and installed as a Greasemonkey script then. To copy an existing script, navigate to C:\Users\****\AppData\Roaming\Mozilla\Firefox\Profiles\****.default\gm_scripts\ and copy the desired script

Felix Bernhard

Posted 2016-03-05T13:17:02.270

Reputation: 224

See the title which states "by UNIX command line". – bgoodr – 2016-03-10T16:32:04.990

Updated description accordingly to make it clearer. – bgoodr – 2016-03-10T16:33:56.443