Firefox profile on tmpfs
Use tmpfs on /dev/shm to store firefox profile. No need root user rights. User can create, delete, and sync by his own.
Depencies: rsync
usage:
usage: firefox-shm [-h] [-v] [-b] [-c] [-s] [-r]
-h | show this help message and exit |
-v | make script noisily |
-b | backup, created a copy in ~/.mozilla/firefox/ from current selected profile with suffix .archive |
-c | create, move the current profile, and created the shm directory, and copy current selected profile, and symlink it |
-s | sync, syncing the temporary profile the local profile |
-r | restore, deleting the temporary profile and move archive profile to current profile |
initialize it:
firefox-shm --create
To do this automatic on login, here an example for Mate-desktop.
~/.config/autostart/firefox-shm.desktop:
[Desktop Entry] Type=Application Exec=firefoxc-shm --create Hidden=false X-MATE-Autostart-enabled=true Name=firefox-shm
Do syncing the temporary profile back to local use crontab.
crontab -e:
# do every 30 minutes a sync */30 * * * * /usr/bin/firefox-shm --sync
Do syncing on logout. Add entry to:
~/.bash_logout:
firefox-shm --sync
Enough go back to default:
firefox-shm --restore