mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2034] Slack profile does not allow to use microphone #1370
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#1370
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 @elvetemedve on GitHub (Jul 6, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2034
The problem
When Slack is started in Firejail sandbox, I can't get microphone working. The application says no sound comes from the mic. However the speakers are working as I can hear the other party.
If I run Slack without the sandboxing it works well.
Steps to reproduce
Environment
Slack version: 3.2.1 (64 bit)
Firejail version: 0.9.54
Linux kernel: 4.17.3
@smitsohu commented on GitHub (Jul 7, 2018):
Can you try if it works with one of these?
Just some wild guesses.
Otherwise you could go to /etc/firejail/slack.profile, comment out all options (add a # in front of each line), and then uncomment line after line until you find the one that stops the microphone from working.
@elvetemedve commented on GitHub (Jul 8, 2018):
@smitsohu The last one (
firejail --noblacklist=/var slack) solved the issue. Thanks for the hint.I'm wondering if it's Linux distro dependent. In that case I would add this exception to
firejail.localfile. Otherwise it would be nice to add it to the mainfirejail.profilefile for everyone's benefit.@smitsohu commented on GitHub (Jul 8, 2018):
Maybe we can replace the
blacklist /varwith the less restrictivewhitelist /etc/firejail/whitelist-var-common.inc. Would that work for you?If you are interested in hunting it down further, you can also run in one terminal
sudo journalctl -fand in anotherfirejail --tracelog slack. Then all blacklist violations should get logged in the first terminal.@elvetemedve commented on GitHub (Jul 8, 2018):
I would help to track it down, but Slack does not start when I add the
--tracelogswitch. At least the application window is not showed up. Any idea why?firejail --tracelog slack@SkewedZeppelin commented on GitHub (Jul 8, 2018):
As a rougher method you can use the following instead
but I agree with @smitsohu, it should be safe to replace that line with whitelist-var-common.inc instead
@elvetemedve commented on GitHub (Jul 8, 2018):
@smitsohu, @SkewedZeppelin If I replace
blacklist /varwithwhitelist /etc/firejail/whitelist-var-common.inc, Slack couldn't connect to the Internet.Secondly
stracerevealed only some files in /var/cache/ directory which is not relevant. I also tried to runsudo lsof +D /varduring the audio call (Slack wasn't sandboxed this time of course), but again no file was kept open by Slack processes.@SkewedZeppelin commented on GitHub (Jul 8, 2018):
@elvetemedve enoent might not be the best thing to search, can you skim the output of just the following?
grep "/var' test.logAs for not having Internet when using whitelist-var-common.inc, are you using systemd-resolved?
@chiraag-nataraj commented on GitHub (Jul 8, 2018):
@elvetemedve I suspect there may be something in
/var/run/(probably the pulse files - on my system, they're in/var/run/user/1000/pulse/) which is necessary for this to work.Interesting, I just tried
firejail --blacklist=/varandparecordwithin it to see ifpulseaudiowas affected by the blacklisted/var, and it seems it wasn't -parecordworked just fine both outside and inside the jail. I will play around to see if a combination of options will causepulseaudioto choke.@smitsohu commented on GitHub (Aug 23, 2018):
@elvetemedve Thanks for the bug report