On 7/7/21 11:24 AM, John Murphy wrote:
On Wed, 7 Jul 2021 19:01:25 +0100 Keith Edmunds
wrote:
Try:
/usr/bin/pw-record /home/john/crontest.wav > /tmp/cronjob.txt 2>&1
...and have a look in /tmp/cronjob.txt after it's run
/tmp/cronjob.txt says error: pw_context_connect() failed: Host is down
I've no idea what that means, or why that should be so.
https://docs.pipewire.org/group__pw__core.html
----
Connect to a PipeWire instance.
Returns
a The Core Global Object on success or NULL with errno set on
error. The core will have an id of PW_ID_CORE (0)
----
So it would seem that the pipewire client cannot connect to the server
(or something like that). Could be ownership, permissions, even selinux
if it is running.
It could also be that running things from cron does not establish a
"session" and then you do not have access permission to audio devices
and such (and dbus, as suggested elsewhere in the thread).
-- Fernando
I tried with arecord in place of /usr/bin/pw-record
and got:
arecord: main:852: audio open error: Host is down.