mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2952] chromium and custom URL protocol handler in KDE #1845
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#1845
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 @AloisJanicek on GitHub (Sep 9, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2952
System information
Background info
In chromium, I am using this little user script to generate URLs which starts with
org-protocol://to capture URLs into emacs.(following setup is based on org-capture-extension's README)
I have
~/.local/share/applications/emacs-capture.desktopfile which points to~/.local/bin/emacs-capturebash script.emacs-capture.desktoplooks like this: (I omitted irrelevant lines)and
emacs-capturescript like thisThis setup works flawlessly without
firejailand delivers URL from browser to emacs.Issue
With
firejailI get following error popup when trying openorg-protocolURL:So I started to investigate and for now end up with
~/.config/firejail/chromium.profilelike this:Now I am able to successfully execute
xdg-open URLorkioclient5 exec URLwhen joining chromium's firejail jail on command line, but it still doesn't work from running chromium GUI itself.for example commands like this works as expected:
Questions
Why is this working on command line and not from application itself? Is there something I can change in configuration to get this working?
@AloisJanicek commented on GitHub (Sep 16, 2019):
I just got it work, it boils down essentially to three issues:
In
/etc/firejail/chromium.profile, filechromium.localis included. This file has followingprivate-etcdeclaration:which somehow prevents KDE's kio or xdg to correctly determine default application for
org-protocol://I disabled this
include, but definitely better would be to add what is needed instead of disabling it completely.Disabling
apparmorsupport allowed my script to be executed bybash. Again it would be better to somehow whitelist this functionality.Finally whitelisting script location was needed.
@rusty-snake commented on GitHub (Sep 17, 2019):
Maybe
xdgfix theprivate-etcissue. https://github.com/netblue30/firejail/blob/master/etc/templates/profile.template#L155-L166@AloisJanicek commented on GitHub (Sep 17, 2019):
sadly just addingedit: it actually worked, see bellowxdgfolder toprivate-etcdidn't fix it+@Vincent43 commented on GitHub (Sep 17, 2019):
In order to make it work with AppArmor you may try using
Exec=bash $HOME/.local/bin/emacs-capture "%u"inemacs-capture.desktop@AloisJanicek commented on GitHub (Sep 17, 2019):
Thank you both, I got it working without compromising security.
exec=bashwas essential forapparmorand addingxdgtoprivate-etcforxdg-opennow my
~/.config/firejail/chromiumis simple:Can I append to
private-etcdeclaration instead of copying and editing it?@rusty-snake commented on GitHub (Sep 24, 2019):
Try it out 😉. It should work.
BTW: If you use
~/.config/firejail/chromium.localinsted of~/.config/firejail/chromium.profile, you can skip theinclude /etc/firejail/chromium.profileline.@rusty-snake commented on GitHub (Oct 13, 2019):
@AloisJanicek
I'm closing here due to inactivity, please fell free to reopen if you have more questions.