Comments (9)
I believe this can be closed because Toolbox passes --volume /dev:/dev:rslave
to podman create
when a toolbox is created since v0.0.11.
from toolbox.
This might work, --volume /dev/snd:/dev/snd
.
Referred to this link, osrf/docker_images#21 (comment)
from toolbox.
With the mounting of /dev/snd
, an application inside container doesn't work well if it the sound is used on the host at the same time.
Errors of mpv
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: Device or resource busy
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ao/jack] cannot open server
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
[ao/sdl] could not open audio: ALSA: Couldn't open audio device: Device or resource busy
[ao] Failed to initialize audio driver 'sdl'
Could not open/initialize audio device -> no sound.
from toolbox.
could this be implemented via an option e.g.
$ toolbox --enable-sound enter
my plan is to run vlc, emacs (using emms) or even firefox within the toolbox container and this would require sound support.
jm2c
toni
from toolbox.
I tried to use the PulseAudio socket from the host and that seems to be fine: PulseAudio works, even if the host uses audio at the same time.
1. Bind mount /dev/snd
2. Install pulseaudio-utils
in the container with dnf.
3. Set $PULSE_SERVER
to the value of /run/user/$(id -ru)/pulse/native
, so that it uses the session of the host. I did not try to run a seperate PulseAudio session in the container.
Edit: Bind mounting /dev/snd
is not necessary, of course, since the container does not access it directly.
from toolbox.
i just discovered that sound simply works with vlc
. /run/user/<uid>/native
is available within the container. didn't have to install pulseaudio-utils, $PULSE_SERVER
is not set. i'm using toolbox from master
.
from toolbox.
Thank you all for the information, I will check it out both.
from toolbox.
/dev/snd
might be sometimes necessary. For instance, liquidwar. it tries to access to /dev/snd
directly.
However, in my case, exporting PULSE_SERVER
is necessary in 0.0.6.
from toolbox.
I copied toolbox to my homedir, added a
--volume /dev/snd;/dev/snd
line to the create function and ran google-chrome in it and it just works.
from toolbox.
Related Issues (20)
- Arch Linux container's extra-packages doesn't need diffutils and keyutils HOT 3
- Consider adding apk based Image like Wolfi or Alpine HOT 8
- Failed to initialize container, AGAIN (Silverblue 39.20240408.0 (2024-04-08T01:47:01Z) HOT 2
- Build succeeded.
- List supported toolbox images
- Cannot access mounted drive with fuse outside of toolbox
- Xwayland broken in toolbox containers HOT 1
- Add distribution: Ubuntu 24.04 LTS HOT 2
- can't start ubuntu (useradd: UID is not unique)
- systemd (255.6-1) breaks dependency
- Missing locales on Arch Linux guest HOT 3
- Can't resolve host `toolbox` inside `fedora-toolbox:40` container HOT 3
- Isolate $HOME directory via snapshot and overlay
- Can't enter fedora 40 toolbx: Failed to bind /etc/machine-id HOT 24
- run0 Allows execution on HOT 6
- Gstreamer unable to find plugins in toolbox
- Fish Shell Completions
- toolbox can't source path HOT 2
- Unable to run fzf through flatpak-spawn
- Fedora 39 Image doesn't build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolbox.