diff options
author | Andrew Cady <d@jerkface.net> | 2020-06-21 12:48:09 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-06-21 12:48:38 -0400 |
commit | d1152d842abe6927fec404a46d10eacba98e80db (patch) | |
tree | 8d622fda7510daa5825d44b3913818da2f5c8ac4 | |
parent | 9f8cc033156b4a389b685597fe80bc5c915694df (diff) |
add readme
-rw-r--r-- | firefox-sideloader/README.md | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/firefox-sideloader/README.md b/firefox-sideloader/README.md new file mode 100644 index 0000000..1e1cbad --- /dev/null +++ b/firefox-sideloader/README.md | |||
@@ -0,0 +1,63 @@ | |||
1 | # firefox-sideloader | ||
2 | |||
3 | ### How to use | ||
4 | |||
5 | The following session demonstrates how to use. | ||
6 | |||
7 | Mostly all you need: | ||
8 | ``` | ||
9 | [u@h:~/firefox-sideloader]$ . functions.sh | ||
10 | [u@h:~/firefox-sideloader]$ clone_default_profile MyNewProfileName | ||
11 | [u@h:~/firefox-sideloader]$ firefox -P MyNewProfileName | ||
12 | ``` | ||
13 | |||
14 | The profile MyNewProfileName will now start up with all extensions copied from | ||
15 | the default profile. Effort was made not to copy any settings or leak any | ||
16 | private data, so that the new profile can be redistributed as a firefox default | ||
17 | startup state. | ||
18 | |||
19 | Also possible: | ||
20 | ``` | ||
21 | [u@h:~/firefox-sideloader]$ clone_profile MyNewProfileName SecondGenerationClone | ||
22 | [u@h:~/firefox-sideloader]$ firefox -P SecondGenerationClone | ||
23 | ``` | ||
24 | |||
25 | ### Future | ||
26 | |||
27 | The next feature (unimplemented but needed) is to change the target home | ||
28 | directory of the profile. Then the `clone_profile` function becomes | ||
29 | suitable to use when creating a new home directory (i.e. a dynamic | ||
30 | /etc/skel/ to work around Firefox's internal dependence on absolute | ||
31 | paths). This is the whole point of this code from my perspective. | ||
32 | |||
33 | ### Counter-factual Future | ||
34 | |||
35 | Another obvious direction to take this code would be to make it work on existing | ||
36 | profiles, rather than being confined to creating a new profile. | ||
37 | |||
38 | The `jq` queries in this codebase illustrate how/where it would be possible to | ||
39 | insert one extension at a time into an existing profile without damaging it. | ||
40 | Just merge the output of those queries back into the JSON input files. The tool | ||
41 | `jq` itself can make the changes needed. It's obviously the right and robust way | ||
42 | to go about this, but I don't have a personal need for it. | ||
43 | |||
44 | ### By the way | ||
45 | |||
46 | Another useful function: | ||
47 | |||
48 | ``` | ||
49 | [u@h:~/firefox-sideloader]$ list_extensions | ||
50 | {"id":"uBlock0@raymondhill.net","name":"uBlock Origin"} | ||
51 | {"id":"bypasspaywalls@bypasspaywalls.weebly.com","name":null} | ||
52 | {"id":"default-theme@mozilla.org","name":null} | ||
53 | [...] | ||
54 | ``` | ||
55 | |||
56 | Check another profile than the default like this: | ||
57 | ``` | ||
58 | [u@h:~/firefox-sideloader]$ list_extensions SecondGenerationClone | ||
59 | [u@h:~/firefox-sideloader]$ list_extensions ~someotheruser/.mozilla/firefox/randomstring.profilename/ | ||
60 | ``` | ||
61 | |||
62 | It should just accept a profile name as an argument and do that itself, but it | ||
63 | does not. | ||