mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3109] VLC xdg-screensaver access #1949
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#1949
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 @sinner- on GitHub (Jan 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3109
Hello,
First of all just want to say thankyou for the amazing software.
I use Xscreensaver and I noticed that when I run
firejail vlcand the "Disable screensaver" preference of vlc doesn't work.Xscreensaver doesn't support DBus, vlc falls back to
xdg-screensavercommand when it can't find a screensaver using DBus.Can the vlc profile be enhanced to give access for vlc to execute
xdg-screensaver?@ghost commented on GitHub (Jan 3, 2020):
Hi, can you confirm that adding
--private-bin=xdg-screensaveron the command line fixes your issue? Alternatively you can addprivate-bin=xdg-screensaverto a vlc.local file (either under /etc/firejail or ${HOME}/.config/vlc.local) and test things that way.@sinner- commented on GitHub (Jan 3, 2020):
Hi @glitsj16 thanks for getting back to me!
I set my screensaver to 1 minute timeout and tested the following things:
firejail vlc, open a movie file and enter fullscreen, confirm the screensaver locks in 1 min.firejail --private-bin=xdg-screensaver vlc, open a movie file and enter fullscreen, screensaver still locks in 1 minute :(I tried to run
firejail --debug vlcandfirejail --debug-blacklists vlcand waited 1 minute with a movie playing but no useful output was produced that shows what firejail is blocking.@ghost commented on GitHub (Jan 3, 2020):
@sinner- Hi, thanks for your detailed response. I'll install VLC and will try to dig around a bit. It could be that xdg-screensaver or VLC (or both) need additional commands in private-bin to work as expected. For now you might want to play with disabling private-bin alltogether (using
--ignore=private-bin). If that doesn't help, I'd recommend commenting out options in /etc/firejail/vlc.profile one by one if you have the time to experiment. We'll get back to you.@ghost commented on GitHub (Jan 3, 2020):
@sinner- Hi again. After installing VLC and playing with its preferences (not even got to testing the firejail profile!) my machine encountered several system freezes (the ones that eventually require hard resets). I hope some other contributors chime in to help with debugging this issue, my machine simply doesn't like VLC, never has. My apologies for that. I'll keep following the thread and will add to the conversation when I have relevant info. It might help if you could add some details about your OS, desktop environment, firejail version etcetera in your next response. Good luck!
@sinner- commented on GitHub (Jan 3, 2020):
Hey again,
Thanks for trying!
Kernel 5.3.16-300.fc31.x86_6 on Fedora 31, using XFCE (where Xscreensaver is default), firejail 0.9.62.
I did some more experiments, the only thing based on your suggestion which worked is
firejail --ignore=private-bin vlc.The
vlc.profileI have looks like this:I commented out all these lines:
and the screensaver still didn't get disabled :( so I assume it must be this line
which is causing this issue.
So I thought maybe vlc is invoking some other program which, after failing, vlc then invokes
xdg-screensaver.I found the reference in the vlc source code which invokes
xdg-screensaver:a15728e4c4/modules/misc/inhibit/xdg.c (L62)but none of the other references in the
modules/misc/inhibitpath seem to invoke an external program in the same way:https://github.com/videolan/vlc/search?q=posix_spawnp&unscoped_q=posix_spawnp
I couldn't understand the vlc code well enough to track the logic of how the inhibit module is invoked itself.
Is there any logging or soft mode or anything for firejail that will tell me what is being blocked as it occurs?
Thanks again.
@rusty-snake commented on GitHub (Jan 3, 2020):
On Fedora xdg-screensaver is a shell-script which talk also to dbus if it is used under GNOME, KDE, ...
I went through it and this came out:
--private-bin=sh,cat,which,readlink,basename,grep,cut,sed,dirname,dbus-send,x prop,gnome-default-applications-properties,kde-config,mv,hostna e,sleep,rm,xset,test,mktemp,ps,kill,dcop,perl,mate-screensaver-command,xscreensaver-command,xautolockMaybe something is still missing and some programs are not necessary for you.
@sinner- commented on GitHub (Jan 3, 2020):
Thanks @rusty-snake, I think I will just comment out the
private-bin ...line in the vlc profile file.@kmille commented on GitHub (Feb 24, 2023):
On my Arch Linux (i3 starts xautolock), the following works (still not the minimum, just used trial and error). In
~/.config/firejail/vlc.local:private-bin sh,cat,which,readlink,basename,grep,cut,sed,dirname,dbus-send,mv,rm,xset,test,mktemp,ps,kill,dcop,xautolock,xdg-screensaver