mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3894] newsboat unable to launch default browser #2443
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#2443
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 @ayham-1 on GitHub (Jan 14, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3894
Write clear, concise and in textual form.
When having firejail enabled (running
firecfg), opening any link using the o key or a link number key, would just fail with:Unable to spawn browser. I don't think the default cfg has support for lynx.Bug and expected behavior
Open feed, try opening browser
The browser to open.
No profile and disabling firejail
firejail --noprofile /path/to/programin a terminal?It worked.
which <program>orfirejail --listwhile the sandbox is running)?No such file or directory
Reproduce
Steps to reproduce the behavior:
Environment
Checklist
https://github.com/netblue30/firejail/issues/1139)--profile=PROFILENAMEis used to set the right profile.LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAMto get english error-messages.browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.debug output
https://pastebin.com/ZLDusshM
@rusty-snake commented on GitHub (Jan 14, 2021):
Maybe that helps: #3312.
@ayham-1 commented on GitHub (Jan 14, 2021):
firejail --private-bin=lynx,sh,gzip --private-etc="lynx,sh,gzip,lynx.cfg,lynx.lss" newsboatThis works. Is there a chance I can make a PR through to add these into the default profile?
@ghost commented on GitHub (Jan 15, 2021):
It's a bit odd that private-etc needs
lynx,sh,gzipas these files do not exist on Arch Linux. I assume adding the below to yournewsboat.localshould work:After doing so you can run
firejail newsboat(if you don't use firecfg) or simplynewsboat(if you do use firecfg) to have lynx support in the newsboat sandbox. A PR is always an option, but in all honesty I find it superfluous in this case. Firejail's .local overrides functionality is implemented exactly for situations like this. Did you try that already?@ayham-1 commented on GitHub (Jan 15, 2021):
Yes, I already have it set up. But I think that the default browser should be at least supported in the official repos, this would set an example on changing the browser
@ghost commented on GitHub (Jan 15, 2021):
Now I understand! I am not familiar with newsboat so I installed it. Only after looking inside its config it became clear that when a BROWSER env var isn't set it falls back to lynx. So please do make a PR.
@ayham-1 commented on GitHub (Jan 15, 2021):
solved #3895
@ghost commented on GitHub (Feb 19, 2021):
I am having a similar problem to this one. My default browser is Brave and have I firejail desktop configuration running. I would like to open links in a sandboxed Brave session, but I can only do this if running Newsboat outside of Firejail. I am able to launch a sandboxed version of Lynx from inside a sandboxed Newsboat by adding 'browser "/usr/local/bin/lynx %u"' to the config file or through the command line with 'set browser...'. The same strategy does not work with Brave.
@rusty-snake commented on GitHub (Feb 19, 2021):
Try to add this to your newsboat.local:
@ghost commented on GitHub (Feb 19, 2021):
@rusty-snake You mean ~/.newsboat or the ~/.local directory? I'm unsure where to find or create it?
@rusty-snake commented on GitHub (Feb 19, 2021):
~/.config/firejail/newsboat.local@ghost commented on GitHub (Feb 19, 2021):
It works now! Would I just add similar lines for any application-related directories in ~ if I wanted to use other browsers at some point?
@rusty-snake commented on GitHub (Feb 21, 2021):
You mean that you switch from brave to e.g. vivaldi, then yes. Just replace the brave specific
noblacklist/mkdir/whitelistwith the one form vivaldi. In addition, vivaldi does not needignore noexec /tmpbutignore noexec /var, so you always need to look at the profiles (if something is broken).Be warned, though, that this deactivates the half sandbox. If your system supports unprivileged userns you should add
seccomp !chrootand remove@rusty-snake commented on GitHub (Feb 22, 2021):
… also uncomment chromium-common-hardened.inc
Much more secure way
Allow only the permissions required to run
system-runand use.Use the
newsboat.localbelow instead the from above and configurexdg-openas browser (and add the xdg-open script) or configure/usr/bin/systemd-run --user --quiet --no-block /usr/bin/firejail /usr/bin/brave-browser %udirectly.newsboat.local:/usr/local/bin/xdg-open:EDIT: Added
noblacklist ${PATH}/systemd-run. Forgot that weblacklist ${PATH}/systemd-run.