mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5971] discord: notifications are not shown #3146
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#3146
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 @haarp on GitHub (Aug 24, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5971
Description
Discord 0.0.28 on Gentoo Linux is not showing notifications, while other Electron apps are.
That points towards
private-tmpinelectron.global. It works if I add this to the discord profile:After comparing with
signal-desktop(another Electron app, which does display notifications), these directives also work:Steps to Reproduce
Steps to reproduce the behavior
firejail discordExpected behavior
Notifications :)
Actual behavior
No notifications :(
Behavior without a profile
I wouldn't dare running an Electron app without a sandbox :/
Additional context
Not sure if my environment has broken something to cause this issue.
Environment
Checklist
/usr/bin/vlc) "fixes" it). (not checked, can't risk running without sandbox)https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/program@kmk3 commented on GitHub (Aug 24, 2023):
[...]
Makes sense to me.
Could you open a PR to add it to discord.profile?
@ghost commented on GitHub (Aug 25, 2023):
To me it doesn't make sense. Our discord-common.profile already allows dbus (both user and system):
2ad255432b/etc/profile-a-l/discord-common.profile (L17-L18)So to me that indeed points to private-tmp. @haarp You did mean both options as
alternativescorrect? Or did you combine them? Perhaps we're missing something here because we don't know what's in your {disable-common,disable-programs,discord,globals}.local files.OT: @kmk3 What do you think of asking people to add any
foo.localcontent if they use that to ourissue template?@haarp commented on GitHub (Aug 25, 2023):
Correct, either of the two boxes work.
This one also is in
signal-desktop.profile, so I assumed it goes along withdbus-user filter,dbus-user.talk.I checked those, but those shouldn't affect notifications. For completeness, here are their contents (now I realize I had duplicates, but that shouldnt matter)
and
discord.localis just the change mentioned in the OP post.@ghost commented on GitHub (Aug 25, 2023):
@haarp Thanks for your detailed reply. Hardening dbus should be the way to go, cfr. https://github.com/netblue30/firejail/issues/5971#issuecomment-1692312755.
Realizing this goes beyond your issue, I was wondering if you could further test our discord profiles. I'm especially interested in any input you can provide relating to the rather unfortunate crippling we still have in
discord-common.profile:2ad255432b/etc/profile-a-l/discord-common.profile (L9-L18)As you can see, besides the dbus options, there's more we could do to harden the discord sandbox considerably if someone could provide info on what works/what doesn't. Can take some time and effort obviously. But again, it's just a question now we have a line of communication with someone that actively uses discord :).
@kmk3 commented on GitHub (Aug 25, 2023):
@glitsj16 on Aug 25:
If the
dbus-usercommands appear beforeprivate-tmp(which would be thecase in both
discord*.localand discord-common.profile), then the dbus socketin the real /tmp might be accessed before
private-tmpgoes into effect.Maybe we could move the
dbuscommands before theprivatecommands in thetemplate, to support the use-case of sockets in /tmp.
Though that might allow escaping
private-tmpunless the socket iswhitelisted, I'm not sure.
Yes.
@kmk3 commented on GitHub (Aug 25, 2023):
@glitsj16 on Aug 25:
Indeed; I suspect that it would work just fine when removing at least the
following entries (and including the dbus commands from the first post):