mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #76] shell scripting firejail a.k.a. add rss feed from firefox to liferea when both run sandboxed #44
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#44
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 @ghost on GitHub (Oct 10, 2015).
Original GitHub issue: https://github.com/netblue30/firejail/issues/76
SITUATION
:: in a non-sandboxed world firefox users can easily add rss feeds to liferea by
instructing the browser to use a script liferea offers as handler for web feeds
(i.e. liferea-add-feed)
:: in a sandboxed context things are different and the above routine fails
because liferea-add-feed checks for a running liferea process..
..which is invisible (expected behavior) from within a firejailed firefox:
SOLUTION
:: use a shell script as firefox's rss handler, intercepts the feed URL, greps firejail --list
and joins liferea's sandbox to execute the regular liferea-add-feed command.
:: from a terminal this all works just fine..
QUESTION
How can this be done using a shell script? Getting liferea's sandbox pid by grepping
'firejail --list' for liferea and issuing a 'firejail --join=26367' command isn't the issue.
How to execute a command inside that joined sandbox in a shell script is. Any pointers
on how to tackle this?
@netblue30 commented on GitHub (Oct 11, 2015):
First of all, instead of PID, it is easier to use a --name to refer to the sandbox:
Then, you can join it like this:
You can pass a command the regular way when you join a sandbox:
@ghost commented on GitHub (Oct 12, 2015):
Thanks for your reply. I did read about the --name=... option in firejail's man page and played with it. Works just fine, but I had reservations about it adding another string to my already quite overburdened browser's titlebar.
Passing the command like you proposed made adding rss feeds work. Thank you kindly for your reaction. Kudos for making firejail available to the world!