Enabling sound in Orjail #86
phantomcraft
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Programs running inside Orjail sandbox don't have sound because network namespaces are initialized as root and don't inherit the Pulseaudio variables that programs use to connect to the ALSA.
But this is very easy to fix, just pass these variables to the sandbox: PULSE_SERVER, PULSE_COOKIE, XDG_RUNTIME_DIR.
With sudo this is easy as:
ip netns exec somens sudo PULSE_SERVER=/run/user/$(id -u someuser)/pulse/native PULSE_COOKIE="$(getent passwd someuser | cut -d: -f6)"/.config/pulse/cookie XDG_RUNTIME_DIR=/run/user/"$(id -u someuser)" -u someuser -- vlc
Open some video or audio file and see the sandboxed app having sound
Beta Was this translation helpful? Give feedback.
All reactions