-
| 2021.09.09 (first 2021.08.31) | https://github.com/icpantsparti/browser-bits/blob/main/firefox-info/profile-in-a-folder-or-encrypted.md | License (MIT): https://raw.githubusercontent.com/icpantsparti/browser-bits/main/LICENSE | Disclaimer: Use with care at your own risk, and verify any results |
Firefox profiles are usually stored in your user home folder, look at about:support
or about:profiles
to see where.
It is possible to use either a Portable Firefox or a command line option to run firefox from another folder location.
If you are not using system encryption (which VeraCrypt can do on Windows).
With VeraCrypt: https://www.veracrypt.fr
- You can use the "Create Volume" button, then "Create an encrypted file container".
- Put the container file in a sensible location where you will not accidentally delete it
- Give the container file an ".hc" extension (then clicking that file opens it with VeraCrypt)
- The tricky part is choosing the container size (perhaps 4GB ?) and NTFS on Windows or eg EXT4 on Linux
you can always move the folders/files to a new larger container if you ever need to.
Use portable Firefox: https://portableapps.com/apps/internet/firefox_portable
- On the download site, below the download button, choose the installer for your language.
- When the installer runs choose where to install
(ie to the drive/path of your folder or mounted encrypted container)
default folder name is "FirefoxPortable" or change that to your own choice - This gives you an entirely separate Firefox program in your specified location, with profile and cache folders.
- It seems to cope when you change the folder location or name
(so no issues if you mount an encrypted container with a different drive/path) - However, you will have to remember to check for updates.
- See https://portableapps.com/support/firefox_portable
for info about copying an existing profile, updating, using extra profiles, and more - Also see
FirefoxPortable/Other/Source/Readme.txt
file for various info about usage
(and an example "FirefoxPortable.ini" file, which you place in the same folder as
"FirefoxPortable.exe", for settings eg paths, parameters, splash, multiple instances)
- Copy the "Firefox" icon from the desktop into your folder or mounted encrypted container.
- Right click that "Firefox" file, select "Properties"
clear the path shown for "Start in"
change "Target" to something like:"C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -profile MYFIREFOXPROFILENAME
- When you click on that "Firefox" icon it will create the folder, and the browser cache is stored there too.
(or it will use an already created/copied profile, but note below) - However, if you rename the profile folder, or you copied/moved a profile
you will have to edit the paths in theextensions.json
file within that profile
Eg you would have to change any "C:\\OLDPATH\\OLDFOLDER" to "K:\\NEWFOLDER" and any "C:/OLDPATH/OLDFOLDER" to "K:/NEWFOLDER".
(so when using an encrypted container it is easier to mount with the same drive/path)
(rough example)
- Download Firefox for Linux: https://www.mozilla.org/firefox/all/
- Extract the
firefox-XX.X.X.tar.bz2
file to your folder of choice
eg/opt/firefox-XX.X.X
or/usr/local/bin/firefox-XX.X.X
or somewhere under your home folder (may be/home/USER/.local/usr/bin/firefox-XX.X.X
??)
or in an encrypted container/media/veracrypt1/firefox-XX.X.X
- To run Firefox, either:
- run from the command line
eg/PATH/firefox-XX.X.X/firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME
- run with a .desktop file
eg copy the/usr/share/applications/firefox.desktop
to/home/USER/.local/share/applications/firefox-XX.XX.X.desktop
edit the file and set thename=firefox-XX.X.X (profile: /PATH/MYFIREFOXPROFILENAME)
andexec=/PATH/firefox-XX.X.X/firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME
- run from the command line
- if the profile path ever changes you will have to edit the
extensions.json
file in the profile folder
(rough example)
- To run Firefox, either:
- run from the command line
egfirefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME
- run with a .desktop file
eg copy the/usr/share/applications/firefox.desktop
to/home/USER/.local/share/applications/firefox-XX.XX.X.desktop
edit the file and set thename=firefox (profile: /PATH/MYFIREFOXPROFILENAME)
andexec=firefox --no-remote --profile /PATH/MYFIREFOXPROFILENAME
- run from the command line
- If the profile path ever changes you will have to edit the
extensions.json
file in the profile folder