Sunday, 25 February 2018

linux - How to backup history in Firefox?


Firefox currently has a history page limit. In about:config:


places.history.expiration.transient_current_max_pages: 10322

I want to retain it completely. There are lot of useful information in that data. Is there a setting or extension that allows me to save old history automatically to my hard drive?



Answer



What does the places.history.expiration.transient_current_max_pages preference do in Firefox? According to this Mozilla: Places Expiration article:



places.history.expiration.max_pages: The maximum number of pages that may be retained in the database before starting to expire.





  • Steps: As the question is with Linux, the following procedure is focused on Linux environment. But the procedure is same for Windows or MacOS but the Firefox installation path is different. Use any file manager or text editor to create and edit files. These steps are with command line.



    • Find the Firefox executable. Type this command to find firefox executable: which firefox. The usual installation path will be /usr/bin/firefox.

    • Change directory to /usr/lib/firefox.

    • Create autoconfig.js file: touch ./defaults/pref/autoconfig.js. The file name is constant, don't use any other name. Add these lines in that file:




  //comments
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);
//END//

The mozilla.cfg file name can be any other name but it should be match with the very next step. * Create mozilla.cfg file: touch /usr/lib/firefox/mozilla.cfg. Add these lines in that file and change that value as you want:


  // IMPORTANT: Start your code on the 2nd line
lockPref("places.history.expiration.transient_current_max_pages", 999999);


  • Notes: The folder structure will be like this (other files are omitted):


/usr/lib/firefox
|
+-- mozilla.cfg
|
+-- defaults/pref
|
+-- autoconfig.js

Always remember to change those file permission with chmod 644 aka. -rw-r--r--. Kill all Firefox processes to make effect the changes. The mozilla.cfg file should have a comment at first line. lockPerf can be changed as following:



  • pref(prefName, value) – If the user has changed the value, it will get reset every time the browser is started.

  • defaultPref(prefName, value) – It can be permanently changed by the user.

  • lockPref(prefName, value) – Locking a preference prevents a user from changing it.


See more options and details in this article: Customizing Firefox Using AutoConfig


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...