1st Step
Go into your Firefox Profile on HDD and create a file "user.js".
This file doesn't ship in standard with Firefox, but once you create it all content within that file will overwrite your "about:config"-settings.
When you enter "about:config" in your Browser-Bar you can enter different values, but Firefox will prioritize the settings in the user.js file you created.
You save "user.js" to somewhere like /home/ekrem/.mozilla/firefox/YOUR-PROFILE/
2nd Step
Create this folder structure somewhere you choose on your HDD
Fore example:
/important/firefox-data/firefox-cron-backup/
/important/firefox-data/firefox-secure-backup/
/important/firefox-data/scripts/
3rd Step
Backup your complete Firefox-Profile folder to /important/firefox-data/firefox-secure-backup/
4th Step
Now you create 2 files in /important/firefox-data/scripts/ with this data. Be SURE TO MODIFY THE FILEPATHS WHERE YOUR STANDARD FIREFOX-PROFILE LIES.
1st file == "login-firefox.sh"
2nd file == "logout-firefox.sh"
Now make both files executable.
Either with chmod from console or right-clicking each 2 Files and selecting the executable option.
5th Step
Dependend on your system you'll have somwhere in System-Settings an option to add Programs/Scripts to Boot and Logout process.
The location of the Systemsetting differs (KDE/GNOME/XFCE).
Once you located this Systementry, you add to the boot-process the created "login-firefox.sh" which is in /important/firefox-data/scripts/.
To the shutdown-process you add "logout-firefox.sh".
If you use KDE you can simply open a console and type:
6th Step
Now we'll create a TMPFS (RAM) partition which will be mounted the next time you reboot.
This partition points to your Firefox-Profile.
As Root, open this file either with your Text-Editor or go into console and type
At the bottom add a new line with this data.
BE SURE TO MODIFY THE PATH TO YOUR STANDARD FIREFOX-PROFILE:
At next Boot, your RAM-partition will be created and your Firefox will be in Ram
7th Step
This step is optional.
If you have an instable system which crashes a lot (it shouldn't) you can add
another Backup-Process independent from System-Login/-Shutdown.
So far we just make operations at boot and shutdown.
As root open a console and type:
At the bottom of this file add these new lines:
Go into your Firefox Profile on HDD and create a file "user.js".
This file doesn't ship in standard with Firefox, but once you create it all content within that file will overwrite your "about:config"-settings.
When you enter "about:config" in your Browser-Bar you can enter different values, but Firefox will prioritize the settings in the user.js file you created.
You save "user.js" to somewhere like /home/ekrem/.mozilla/firefox/YOUR-PROFILE/
user_pref("network.prefetch-next", false);
user_pref("browser.cache.disk.enable", true);
user_pref("browser.cache.disk.capacity", 131072);
user_pref("browser.cache.memory.capacity", 20000);
user_pref("browser.safebrowsing.enabled", false);
user_pref("browser.safebrowsing.malware.enabled", false);
user_pref("content.notify.backoffcount", 5);
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("nglayout.initialpaint.delay", 0);
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.ssl", true);
user_pref("network.http.pipelining.firstrequests", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("network.http.max-connections", 48);
user_pref("network.http.max-connections-per-server", 24);
user_pref("network.http.max-persistent-connections-per-proxy", 16);
user_pref("network.http.max-persistent-connections-per-server", 8);
user_pref("browser.sessionhistory.max_entries", 20);
user_pref("browser.sessionhistory.max_total_viewers", 1);
user_pref("browser.sessionstore.max_tabs_undo", 4);
user_pref("browser.sessionstore.interval", 50000);
user_pref("mousewheel.withnokey.sysnumlines", false);
user_pref("mousewheel.withnokey.numlines", 10);
user_pref("geo.enabled", false);
user_pref("browser.tabs.animate", false);
2nd Step
Create this folder structure somewhere you choose on your HDD
Fore example:
/important/firefox-data/firefox-cron-backup/
/important/firefox-data/firefox-secure-backup/
/important/firefox-data/scripts/
3rd Step
Backup your complete Firefox-Profile folder to /important/firefox-data/firefox-secure-backup/
4th Step
Now you create 2 files in /important/firefox-data/scripts/ with this data. Be SURE TO MODIFY THE FILEPATHS WHERE YOUR STANDARD FIREFOX-PROFILE LIES.
1st file == "login-firefox.sh"
#!/bin/bash
# At Login your Firefox-Profile will be based in RAM.
# Your Firefox-Profile will be therefore empty as you can not keep DATA in RAM when you Boot.
# So we have to copy our Cron-Backup into RAM once you reboot your system
## Deletes your whole Standard Firefox-Profile
rmdir /home/ekrem/.mozilla/firefox/uq3g6doz.default/*
rm --interactive[=never] -r /home/ekrem/.mozilla/firefox/uq3g6doz.default/*
## Copies your Cron-Backup from HDD into your Standard Firefox-Profile which relies in RAM
cp -r /important/firefox-data/firefox-cron-backup/* /home/ekrem/.mozilla/firefox/uq3g6doz.default
2nd file == "logout-firefox.sh"
#!/bin/bash
#
# When you logout from your System we'll backup your Firefox-Profile, which relies in RAM to the HDD
# If we don't do this your whole Firefox-Data would be lost
## First we delete the Firefox-Cache. My Cache is usually +400 MB.
## We don't have to copy this crap data
rmdir /home/ekrem/.mozilla/firefox/uq3g6doz.default/Cache/*
rm --interactive[=never] -r /home/ekrem/.mozilla/firefox/uq3g6doz.default/Cache/*
## We delete our old Cron-Backup folder from HDD, as we will renew this folder with the data from RAM
rmdir /important/firefox-data/firefox-cron-backup/*
rm --interactive[=never] -r /important/firefox-data/firefox-cron-backup/*
## We know vacuum all SQLite Database in your Firefox-Profile
## Be sure that you have SQLite installed in your system
for f in /home/ekrem/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done
## Everything done. Know we copy the RAM-Data to HDD.
## At next system boot you'll have this data again in RAM from "login-firefox.sh" script
cp -r /home/ekrem/.mozilla/firefox/uq3g6doz.default/* /important/firefox-data/firefox-cron-backup
Now make both files executable.
Either with chmod from console or right-clicking each 2 Files and selecting the executable option.
5th Step
Dependend on your system you'll have somwhere in System-Settings an option to add Programs/Scripts to Boot and Logout process.
The location of the Systemsetting differs (KDE/GNOME/XFCE).
Once you located this Systementry, you add to the boot-process the created "login-firefox.sh" which is in /important/firefox-data/scripts/.
To the shutdown-process you add "logout-firefox.sh".
If you use KDE you can simply open a console and type:
cp /important/firefox-data/scripts/login-firefox.sh /home/ekrem/.kde4/Autostart
cp /important/firefox-data/scripts/logout-firefox.sh /home/ekrem/.kde4/shutdown
6th Step
Now we'll create a TMPFS (RAM) partition which will be mounted the next time you reboot.
This partition points to your Firefox-Profile.
As Root, open this file either with your Text-Editor or go into console and type
This file contains the mount-partitions of your System.nano /etc/fstab
At the bottom add a new line with this data.
BE SURE TO MODIFY THE PATH TO YOUR STANDARD FIREFOX-PROFILE:
tmpfs_firefox /home/ekrem/.mozilla/firefox/uq3g6doz.default tmpfs noatime,nodiratime,mode=1777 0 0
At next Boot, your RAM-partition will be created and your Firefox will be in Ram
7th Step
This step is optional.
If you have an instable system which crashes a lot (it shouldn't) you can add
another Backup-Process independent from System-Login/-Shutdown.
So far we just make operations at boot and shutdown.
As root open a console and type:
nano /etc/crontab
At the bottom of this file add these new lines:
# In addition to backing up your RAM Firefox-Profile-Data at shutdown-event,
# also backup your data in live-system.
#
# SAVE Ram-Data to HDD every 2 hours
0 */2 * * * root ./important/firefox-data/scripts/logout-firefox.sh