Skip to content

21 comments

Is there any reason you are looking to use firejail?

I saw in another comment you don't think you need to firejail chrome because its sandboxed. So is Firefox: https://wiki.mozilla.org/Security/Sandbox/Process_model#Sandbox_Architecture If you place one in a firejail you should probably place both.

Is there anything in particular you are trying to do?

10 points

I just want to be able to be able to browse porn websites without the fear of harmful flash, javascript, etc.

5 points

Your better off using umatrix or noscript and ublock origin. With those plugins installed you are much less susceptible to the types of attacks. Both chrome and Firefox currently block flash applications. All these applications support these extensions. Plus by being on Linux there is virtually no risk you will be a drive-by target.

If your that concerned with security any application that connects to the internet should be firewalled. Browsers especially since it's the standard portal to the internet.

6 points
unknown author1 hidden

Deleted before we saved it.

8 points

I don't see the point in firejailing other applications since they're not as big risk factors

1 points

Interesting. For me it is exactly the other way around, since I use Firefox for my daily browsing. I firejail Google Chrome with --private such that it starts with a “fresh install” every time I start it up. There is also some stuff built around it, such that it doesn't show the first run dialog and that uBlock Origin is automatically installed. I can post the script if anyone is interested.

3 points

I'm interested in the script, could you please share it? Thank you!

2 points

I use Firefox with uBlock origin and uMatrix for my daily browsing. The script blocker uMatrix has become necessary because the internet is increasingly turning into a surveillance machinery with all kinds of auditing everywhere. However, that also means that all those shitty pages which pull in a gazillion third-party scripts will stop working and whitelisting these script selectively until it starts working again is a complete nightmare.

That is why I sometimes run Google Chrome, but to keep it from spying into my filesystem I run it in a firejail in private mode. This is not a security measure because breaking out of the sandbox will always be possible for a sufficiently sophisticated adversary. However, just running in a private firejail means that we lose any local profile retention, so installed extension will be forgotten once the firejailed Google Chrome closes. To this end, I simply download uBlock origin from the Google Chrome Store on the fly, unpack it into /tmp/uBlock and tell Google Chrome to load it on startup.

There are still some TODOs left with the script. For instance, I would like to disable the password storage and third-party cookies on startup, but for now it's good enough for this one Netflix movie I watch a month.

Save this script in your local scripts folder (for me it's saved as ~/.local/bin/goolag) and make it executable. Enjoy!

#!/bin/sh

# Google Chrome is installed under different names for different distributions.
# Use the GOOGLE_CHROME environment variable to override.
if [ -z "${GOOGLE_CHROME}" ]; then
    if command -v google-chrome > /dev/null; then
        GOOGLE_CHROME=google-chrome
    elif command -v google-chrome-stable > /dev/null; then
        GOOGLE_CHROME=google-chrome-stable
    else
        echo "Google Chrome does not seem to be installed"
        exit 1
    fi
fi

# If it doesn't exist, download and unzip uBlock origin to /tmp/ublock
# Requires curl and unzip
if ! [ -d "${TMPDIR:-/tmp}/ublock" ]; then
    echo "Fetching uBlock origin"
    UBLOCK_ID="cjpalhdlnbpafiamejdnhcphjbkeiagm"
    curl --silent --location --output "${TMPDIR:-/tmp}/ublock.crx" \
        "https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D${UBLOCK_ID}%26uc&prodversion=32"
    unzip -q "${TMPDIR:-/tmp}/ublock.crx" -d "${TMPDIR:-/tmp}/ublock"
    rm "${TMPDIR:-/tmp}/ublock.crx"
fi

# Run in firejail with the following flags:
# --no-first-run: suppress the “First Run” dialog
# --no-pings: No hyperlink auditing pings
# --no-referrers: Don't send referrer when clicking links
# --load-extension: Load uncompressed extension from path
#
# Other flags to consider:
# --incognito: Start in incognito mode
# --disable-translate: Disable automatic Google Translate
exec firejail --private "${GOOGLE_CHROME}" \
    --no-first-run \
    --no-pings \
    --no-referrers \
    --load-extension="${TMPDIR:-/tmp}/ublock"
3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.