Hi,
I have an /etc/ppp/ip-up.local script that amongst some useful things when my mobile connection goes
up or down, it also plays a sound. It was working. But recently, after an update of many things it
stopped working with this message in syslog:
> Oct 12 05:00:29 minas-tirith ip-down: /usr/bin/play FAIL formats: can't open output file `default': can not open audio device: Connection refused
the piece of the script is this:
/usr/bin/play -q /usr/share/sounds/KDE-Im-Connection-Lost.ogg
It works nicely when called from a terminal, both as user and as root. Maybe the failure is when
there is no terminal, ie, from the system script.
Ideas? Even using other scriptable sound player would do. This one is from sox.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))
This hints at attempt to speak with pulseaudio which probably fails because no information about socket is available in “foreign” session. You are apparently not alone: https://bugs.archlinux.org/task/29524
Here is what I got out of the fix for this problem was to:
I’m using this fix for now:
export AUDIODRIVER=alsa
With more detail on the issue given here:
So the problem appears to be that SoX only checks whether its PulseAudio format handler is present and, if so, decides to use it, even if PulseAudio isn’t running or not installed at all. This behaviour was concealed in previous versions because the PulseAudio format handler had a lower priority then.
Until there is an upstream solution, you have at least three options: 1. actually use pulseaudio (i.e. install and properly configure it) 2. override the default by setting AUDIODRIVER=alsa 3. remove the libsox-fmt-pulse package
I felt like the solution should appear in this message thread.
Thank You,
On 2012-10-12 20:06, jdmcdaniel3 wrote:
>
> Here is what I got out of the fix for this problem was to:
>
>> I’m using this fix for now:
>>
>> export AUDIODRIVER=alsa
it works… :-o
Thanks. I think, now that I see this, that I saw this solution time ago. Dunno where. :-?
> With more detail on the issue given here:
>
>>
>> So the problem appears to be that SoX only checks whether its
>> PulseAudio format handler is present and, if so, decides to use it,
>> even if PulseAudio isn’t running or not installed at all. This
>> behaviour was concealed in previous versions because the PulseAudio
>> format handler had a lower priority then.
>>
>> Until there is an upstream solution, you have at least three options:
>> 1. actually use pulseaudio (i.e. install and properly configure it) 2.
>> override the default by setting AUDIODRIVER=alsa 3. remove the
>> libsox-fmt-pulse package
>
> I felt like the solution should appear in this message thread.
Funny, because pulse is running and configured - but under my user, not root.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))