mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1398] Allow custom temporary (--private) profile #956
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#956
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rieje on GitHub (Jul 23, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1398
One thing I think would be extremely useful is allowing to use a custom profile for temporary (--private) sessions that is currently loaded in memory (rather than on disk). At the moment, only the Firefox default settings can be used. The problem with using
--private <directory>is it's not a temporary profile--your browser fingerprint/activity builds up over time whether or not you delete your cookies and wipe the cache every session--stuff gets saved on disk and it's not practical nor possible to deal with all the data that gets written throughout and across sessions.Why is this useful? You get the benefits of a truly temporary profiles while keeping your addons and their settings as well as browser settings. You get the same environment you're familiar with. It can have its own set of defined/"temporary" bookmarks for easy access, addons like uBlock Origin means no aggressive ads, etc.
I wonder how difficult it is to implement such a feature. An example I'm thinking of is making a copy of your current
/usr/lib64/firefoxdirectory and have a setting point to that copy to load that custom profile as a temporary session.@netblue30 commented on GitHub (Jul 29, 2017):
Look at --private-home in man page. Is this what you need?
@Hocuri commented on GitHub (Aug 21, 2017):
I would also like this feature. I can't find --private-home in the man pages but I assume you meant --private.
But unfortunately, as @rieje already pointed out:
because you can't configure a folder whose content is copied to the temporary home.
What would be needed is a mixture from --private and --private=: A temporary home which is initialized with the content of another folder.
On the other hand, this can also be done by a script like this one: (so it is not that urgent)
mkdir .home-tmpcp -R .mozilla .home-tmpfirejail --private=.home-tmprm -r .home-tmp@rieje commented on GitHub (Aug 23, 2017):
@netblue30 Sorry for the late response, but this is exactly what I was looking for--works great. However, due to the way it works where it copies
~/.mozillato the temp filesystem for my particular example (since I want the the temporary sandbox to use my existing extensions), it requires I actually have my Firefox settings in~/.mozilla. I actually don't--I never run Firefox without a sandbox so I never had a~/.mozilla. Instead, I have all my--private=directories like so:I had to run Firefox once without a sandbox so
~/.mozillacontents gets generated and then Icp ~/.firejail/firefox-profile1/.mozilla/firefox/main/* ~/.mozilla/firefox/main/before I could use--private-home.Besides this workaround, it also means I have to do this every time I want to use
--private-homewith different settings. It would be really nice to somehow allow specifying a destination path to the temporary filesystem, which allows for significantly more flexibility like being able to easily run different profile settings. It might look something like this--private-main=~/.firejail/firefox-profile1/.mozilla/firefox/main/which copies the contents of the directory of--private-mainto the temporary filesystem's~/.mozilla/firefox/<xxxxxxx>.default/. So you can specify your own settings that are not necessarily in~/.mozillaand can also easily switch which settings to use by changing the argument of--private-main.@Hocceruser
--private-homeis documented in themanand works as you expect: