mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4988] mplayer: program does not start #2845
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#2845
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 @Rosika2 on GitHub (Feb 27, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4988
Hi all,
I once wrote a tts-script (text-to-speech) which has always worked well. Yet recently - with the new version of firejail (0.9.68) I seem to run into problems.
The problematic part is this:
At some point in the script I need to run mplayer within firejail, where mplayer wants to access a sound-file (.wav) which is located in /tmp.
This was no problem until now but as of late it seems it is.
So I tried out a simplified command to verify it:
For setting up the scenario I copied a .wav-file into /tmp in order to access it.
Then:
So mplayer running within firejail doesn´t seem to have access to the file residing in /tmp.
After that I tried it with the --noprofile option:
The process got stuck here and I had to abort with "CTRL+C":
Running the mplayer-command without firejail yields perfect results; but I want to implement the sandbox mechanism at this point.
What might be the background of this behaviour?
Thanks a lot in advance for your help.
Many greetings.
Rosika
@rusty-snake commented on GitHub (Feb 27, 2022):
To give mplayer access to
/tmp/behalten_Pausenzeichen_SWF1_1974.wavyou need towhitelist /tmp/behalten_Pausenzeichen_SWF1_1974.wav(orwhitelist /tmp/*.wavin general; orignore private-tmpbut this is less secure). This is not new in firejail 0.9.68 maybe something different changed too?So
firejail --noprofile mplayerstill fails? Doesfirejail --keep-fd=all --profile=noprofile /usr/bin/mplayer …work?@Rosika2 commented on GitHub (Feb 27, 2022):
Hi @rusty-snake,
thanks so much for your quick reply.
First of all: the whitelist option works, which is great.
firejail --whitelist="/tmp/*.wav" mplayer /tmp/behalten_Pausenzeichen_SWF1_1974.wavplays the .wav-file in /tmp as it used to.
(Note: I had to use inverted commas as the fish shell would otherwise complain: No matches for wildcard '--whitelist=/tmp/*.wav' ; with bash of course not needed).
So that´s fine. Thanks a lot.
Hmm, actually not. Of course I´m on a new kernel due to updates now: 5.4.0-100-generic.
That´s the only thing which I can think of.
As far as noprofile is concerned:
Still the same result:
Thanks so much again and many greetings.
Rosika
@rusty-snake commented on GitHub (Feb 27, 2022):
Maybe
deterministic-shutdownhelps.@Rosika2 commented on GitHub (Feb 27, 2022):
Hi again,
sorry, it doesn´t seem to improve the outcome of the command either.
I get the same results.
--noprofilestill seems difficult.Well, as long as the
--whitelist-option helps (which it does) I´m really okay.Many thanks.
Rosika
@rusty-snake commented on GitHub (Feb 27, 2022):
The hangs have likely the same cause as in #4935.
You can try to bisect this if you want.
@Rosika2 commented on GitHub (Feb 28, 2022):
Hi @rusty-snake,
Yes, that sounds plausible - and it would certainly be the same case with a third problem I detected yesterday:
I often like to perform web-searches with
ddgr. And all of a sudden a command that used to work doesn´t work any more:The error message seems weird as there is a suitable
ddgrexecutable in the respective directory:Once again I tried the command with the
--noprofileoption:and here again the programme hangs until I manually abort with "CTRL+C".
Thanks for the suggestion. I´d have to read up on the topic first as I´m certainly not proficient enough for doing that by default.
Many thanks and many greetings.
Rosika
@Rosika2 commented on GitHub (Feb 28, 2022):
UPDATE:
For my latest problem (the one with
ddgrif found a workaround:ddgrmight trigger any problems I got hold of the latest package as a zip-file: https://github.com/jarun/ddgr/releases/tag/v1.9 [Source code (zip)], unpacked it and put it a dedicated directory:/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/work/ddgr-1.9/ddgr-1.9/
fish-syntax):cd /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/work/ddgr-1.9/ddgr-1.9; and env BROWSER=w3m firejail --private=(pwd); and cdI get in the respective folder and from there I can issue the command
./ddgrand can initiate search queries.w3mbeing the respective browser I set. So everything´s executed within that dedicated private directory; and it seems to work well.I think I can live with this solution/workaround.
Thanks again so much for your help.
Many greetings from Rosika