Tag Archives: Firefox

Automatic Export About:Config Content Compare the Differece between for Firefox

Requirement:

We need to compare the difference between the configuration changes between the new vision of the FF and the previous version

We wish to compare the configuration setting in plain text. Then we could use the compare tools such as beyond compare or winmerge to give us a quick visual for the difference.

The Problem:

There is not a official way to export the about:confg page from FF into plain text file. There is a prefs.js file locate in the firefox profile folder, it contains some of the configuration setting but not all.

Known solutions to export the about:config but not well enough:

Solution for export the about:config:

Use the GUI automation tool(autoit) to help export the configuration directly from the about:config page. The script is export-opened-firefox-config.au3 which could be download from my github repot

  1. Install autoit, which double be download from official website follow the previous link
  2. Download the export-opened-firefox-config.au3
  3. Before run the script close all the Firefox process existed in the current system
  4. Run the script export-opened-firefox-config.au3
  5. Open the Firefox that you want to export the about the configure content
  6. The script will start automatically and wait for it stops, please make any user input during the script execution
  7. The output.txt will be generated at the same location of the script file export-opened-firefox-config.au3 which contain all the configuration values
  8. Check the last line of the output.txt contain the last item of the about:config. If the values are same then all is well. If not please modify the sleep time for the script to give more calculate time for the low performance system.

Solution for generate the difference compilation results:

Use python to parse and generate the previous generate configuration files and the current user.js settings which contain in the LR-INSTALL-DIRECTORY\dat\FFProfile\user.js. The python script could be check out from my personal tools repo from github

  1. Install python 2.7.x, if current system doesn’t contain python environment
  2. Install xlsxwriter from pip or download the package install manually. Check this link, if you doesn’t familiar with python
  3. Download the script
  4. Copy and replace the about config content files and the user.js into the data folder to make it follow this file structure

2015-12-02_110835

2015-12-02_111617

5. Execute the python script the output files will be overwrite and generated automatically  Note: If the excel file is not required you could common the script lines relative to generate excel to only generate plain text report. The key/value pair is separate by semicolons like this:

2015-12-02_111832

References

Note: the content of the wiki may adapt to the old version of FF to check the new version please follow the link supplied in the wiki pages.