Tip: Share gm_scripts among multiple Firefox profiles

73 views
Skip to first unread message

Dave Land

unread,
Aug 14, 2009, 4:31:13 AM8/14/09
to greasemon...@googlegroups.com
Folks,

As a web developer, I currently have three copies of Firefox (each
with its own profile, due to incompatibilities among add-ons between
versions) -- 2, 3, and 3,5. I also have several other profiles that I
use from time to time.

After updating the includes for a script or two (then copying it among
my various FF profiles) or updating the a script itself (and having to
distribute the changes to the various FF profiles), I decided to try
to see if it's possible to have a "master" gm_scripts directory shared
among multiple profiles.

Of course, I wouldn't be writing this if it weren't possible.

I'm on a Mac, so your exact steps may be a bit different.

First, I moved the best copy of gm_scripts directory into a common
location that is shared among all the profiles. On a Mac, it is here:

/Users/dland/Library/Application Settings/Firefox/gm_scripts

Then, in each of the profile directories, I deleted gm_scripts and
replaced it with a "symlink" (a Un*x "alias") so that Firefox thinks
the folder is actually inside the profile.

Now, if I "Manage User Scripts" from any Firefox browser and make
changes (changing the includes or excludes, enabling or disabling
scripts, or even editing scripts), I'm doing it for all my Firefox
profiles at once.

Dave

Jasmine

unread,
Oct 1, 2009, 11:06:40 PM10/1/09
to greasemonkey-users
Hi Dave,

Thanks a lot for this tip.
I was looking into doing the same exact thing, but on Linux (Ubuntu
Karmic 9.10), since I run - like you - different versions of firefox
(firefox-3.5 and swiftweasel-3.5 mainly), and since I would be using
this laptop as well as my dad, I figured it is best to share the gm
scripts that I deem necessary in both user accounts and in all
browsers profile.

I googled a bit, just to confirm what I was thinking, to find if there
were any shortcomings, till I came across your post, which confirmed
for me that its as simple as it seemed :)

Simply, I moved the gm_scripts directory from my firefox profile
directory to: /usr/lib/firefox-addons/gm_scripts
root@laptop:~$ mv .mozilla/firefox/xxxxxxxxx.default/gm_scripts /usr/
lib/firefox-addons

And symlinked to it from both firefox and from swiftfox-3.5:
jas@laptop:~$ ln -s /usr/lib/firefox-addons/gm_scripts .mozilla/
firefox/xxxxxxxxx.default/gm_scripts
jas@laptop:~$ ln -s /usr/lib/firefox-addons/gm_scripts .sw35/
swiftweasel/xxxxxxxxxx.default/gm_scripts

Notice however:
jas@laptop:~$ ls -l /usr/lib/firefox-addons/gm_scripts/
youtube_without_flash_au/
total 12
-rw-r----- 1 jas jas 9923 2009-10-02 04:39
youtube_without_flash_au.user.js

The greasemonkey script for "Youtube Without Flash Auto" was readable
only by my user account, so I changed it's permission mode so that it
can also be accessed (read-only) from firefox profile in my dad's user
account:

jas@laptop:~$ chmod 644 /usr/lib/firefox-addons/gm_scripts/
youtube_without_flash_au/youtube_without_flash_au.user.js
jas@laptop:~$ ls -l /usr/lib/firefox-addons/gm_scripts/
youtube_without_flash_au/total 12
-rw-r--r-- 1 jas jas 9923 2009-10-02 04:39
youtube_without_flash_au.user.js

and I think that about does it...

Thanks for confirming my thoughts Dave :)

Regards,
Jas
Reply all
Reply to author
Forward
0 new messages