On Tue, Aug 21, David Haller wrote:
Hello,
On Tue, 21 Aug 2018, Michael Fischer wrote:
I've got the basic recipe working, e.g.
:0 * ^from:.*foo@gmail.com.* { :0c: ${MAILDIR}/INBOX :0ahi | cvlc -I default -R --gain 8.0 ${HOME}/ringtones/cash_register.mp3 }
(pretty much copy-pasted from examples on the web).
However, while the `cvlc` commmand works fine from the command line, when run from procmail, I keep getting
[000055a9e1d96468] core audio output error: Audio output failed [000055a9e1d96468] core audio output error: The audio device "default" could not be used: Device or resource busy. [000055a9e1d96468] core audio output error: module not functional [00007fbddcc0ca08] core decoder error: failed to create audio output ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave
in the procmail log
You've got a permission problem on /dev/snd/*.
Just tested with:
==== :0 { :0fwc | /bin/sh -c 'formail -A "X-UID: $(id)"'
:0wc | ogg123 /usr/share/sounds/KDE-Im-Message-In.ogg
# :0 # inbox } ====
As it turns out, via procmail, you _ONLY_ have your primary group, as you can see by the "X-UID: " header inserted via formail, e.g. "users". But /dev/snd/* are 'crw-rw---- root.audio'... And not "root.users".
Depending on your system:
a) esp. if it's a single-user box, think about changing the group of /dev/snd/*
Thanks. Tried `sudo chgrp users /dev/snd/*` and verified. Didn't change anything from the "run from script setting DISPLAY=:0" case. [pulseaudio] socket-server.c: bind(): Address already in use [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed. [pulseaudio] main.c: Module load failed. [pulseaudio] main.c: Failed to initialize daemon. [pulseaudio] main.c: Daemon startup failed. NB! (might be relevant) - when the mail comes in, I have a video playing in another `vlc` process... Works - starting script from a terminal window while other `vlc` is running - the procmail recipe when NOT running another `vlc` process Fails - the procmail recipe when another `vlc` is running (also had a similar problme when the script ran ffplay...) Not sure what the right incantation or setting (if any) is to avoid what looks like a collision (which pulse isn't handling?) Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org