[GH-ISSUE #2733] [question] - running firefox with profile in RAM #1720

Closed
opened 2026-05-05 08:23:19 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @Edu4rdSHL on GitHub (May 31, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2733

Hello, I know that it isn't a firejail issue and I've opened it because I was searching for resources but sadly I doesn't found anything.

I'm trying to run Firefox profile in RAM using it script:

#!/bin/sh

static=static-$1
link=$1
volatile=/dev/shm/firefox-$1-$USER

IFS=
set -efu

cd ~/.mozilla/firefox

if [ ! -r $volatile ]; then
	mkdir -m0700 $volatile
fi

if [ "$(readlink $link)" != "$volatile" ]; then
	mv $link $static
	ln -s $volatile $link
fi

if [ -e $link/.unpacked ]; then
	rsync -av --delete --exclude .unpacked ./$link/ ./$static/
else
	rsync -av ./$static/ ./$link/
	touch $link/.unpacked
fi

What it do is basically put the profile in /dev/shm/firefox-* and symlink $HOME/.mozilla/firefox/profile.xyz to it. I can't get it working still with noblacklist /dev/shm/firefox-*, any help will be appreciated.

And sorry for putting it here.

Originally created by @Edu4rdSHL on GitHub (May 31, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2733 Hello, I know that it isn't a firejail issue and I've opened it because I was searching for resources but sadly I doesn't found anything. I'm trying to run Firefox profile in RAM using it script: ``` #!/bin/sh static=static-$1 link=$1 volatile=/dev/shm/firefox-$1-$USER IFS= set -efu cd ~/.mozilla/firefox if [ ! -r $volatile ]; then mkdir -m0700 $volatile fi if [ "$(readlink $link)" != "$volatile" ]; then mv $link $static ln -s $volatile $link fi if [ -e $link/.unpacked ]; then rsync -av --delete --exclude .unpacked ./$link/ ./$static/ else rsync -av ./$static/ ./$link/ touch $link/.unpacked fi ``` What it do is basically put the profile in /dev/shm/firefox-* and symlink $HOME/.mozilla/firefox/profile.xyz to it. I can't get it working still with `noblacklist /dev/shm/firefox-*`, any help will be appreciated. And sorry for putting it here.
gitea-mirror 2026-05-05 08:23:19 -06:00
Author
Owner

@smitsohu commented on GitHub (May 31, 2019):

You may want to have a look at the --keep-dev-shm option. If your Firejail doesn't have it, you will need to upgrade to a newer version.

<!-- gh-comment-id:497639725 --> @smitsohu commented on GitHub (May 31, 2019): You may want to have a look at the `--keep-dev-shm` option. If your Firejail doesn't have it, you will need to upgrade to a newer version.
Author
Owner

@ghost commented on GitHub (May 31, 2019):

@Edu4rdSHL There's a dedicated program for doing what you want called profile-sync-daemon. See the Arch Wiki page and the official repo for more info. It should work with firejail out-of-the-box.

<!-- gh-comment-id:497642138 --> @ghost commented on GitHub (May 31, 2019): @Edu4rdSHL There's a dedicated program for doing what you want called `profile-sync-daemon`. See the [Arch Wiki page](https://wiki.archlinux.org/index.php/Profile-sync-daemon) and the [official repo](https://github.com/graysky2/profile-sync-daemon#installation-from-distro-packages) for more info. It should work with firejail out-of-the-box.
Author
Owner

@chiraag-nataraj commented on GitHub (May 31, 2019):

@Edu4rdSHL, why not use a temporary directory under /tmp/user/$UID?

<!-- gh-comment-id:497706682 --> @chiraag-nataraj commented on GitHub (May 31, 2019): @Edu4rdSHL, why not use a temporary directory under `/tmp/user/$UID`?
Author
Owner

@Edu4rdSHL commented on GitHub (Jun 1, 2019):

Thanks to all. @glitsj16 profile-sync-daemon worked as expected.

<!-- gh-comment-id:497959666 --> @Edu4rdSHL commented on GitHub (Jun 1, 2019): Thanks to all. @glitsj16 profile-sync-daemon worked as expected.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1720
No description provided.