OK, I found what the problem is: For pulseaudio to work (or at least paplay), the network plug/interface also needs to be added. Snapd 2.0.10+ is also needed.
Without the network plug, running paplay prints these messages to the journal: Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 audit(1467403328.239:86): auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 Adding the network plug fixes this. So, this needs to be investigated. The pulseaudio interface also needs some kind of local network access. But giving it full network and Internet access is not a great idea. I'll edit the bug description accordingly. --- "aplay" still doesn't work. It throws this error: ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default aplay: main:722: audio open error: No such file or directory I'll report this in another bug. ** Summary changed: - Can't execute paplay, aplay, etc. even with pulseaudio interface + paplay doesn't work without the network interface ** Description changed: + Pulseaudio, or at least the "paplay" command, doesn't work without the + network plug/interface. + + Running that command inside a snap with the pulseaudio interface prints + something like this in the journal: + + Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 + Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 audit(1467403328.239:86): auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 + + Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is + required to even get this far. + + + [ORIGINAL DESCRIPTION] I was packaging a small Racket/Scheme game. Sound playback doesn't work, even with the pulseaudio interface. According to https://docs.racket-lang.org/gui/Windowing_Functions.html#%28def._%28%28lib._mred%2Fmain..rkt%29._play-sound%29%29 , Racket uses the "aplay" command (or others) to play sound, but it isn't available inside the snap. I tried bundling the alsa-utils package, but it throws an error when trying to play a sound. Maybe the pulseaudio interface should grant access to these commands and everything else that is required? ** Description changed: Pulseaudio, or at least the "paplay" command, doesn't work without the network plug/interface. Running that command inside a snap with the pulseaudio interface prints something like this in the journal: Jul 01 21:02:08 bruno-laptop audit[27684]: SECCOMP auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 Jul 01 21:02:08 bruno-laptop kernel: audit: type=1326 audit(1467403328.239:86): auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=27684 comm="paplay" exe="/snap/tetris-em-racket/x1/usr/bin/pacat" sig=31 arch=c000003e syscall=55 compat=0 ip=0x7fa4b5b3892a code=0x0 - Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is - required to even get this far. + Note: snapd 2.0.10 or later (which is in xenial-proposed right now) is required to even get this far. + The snap also needs to bundle "pulseaudio-utils" for it to work. [ORIGINAL DESCRIPTION] I was packaging a small Racket/Scheme game. Sound playback doesn't work, even with the pulseaudio interface. According to https://docs.racket-lang.org/gui/Windowing_Functions.html#%28def._%28%28lib._mred%2Fmain..rkt%29._play-sound%29%29 , Racket uses the "aplay" command (or others) to play sound, but it isn't available inside the snap. I tried bundling the alsa-utils package, but it throws an error when trying to play a sound. Maybe the pulseaudio interface should grant access to these commands and everything else that is required? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1596717 Title: paplay doesn't work without the network interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1596717/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs