[LAD] Simple Pipewire test request

Wim Taymans wim.taymans at gmail.com
Fri Jul 9 14:25:03 CEST 2021


You need to make sure the cron script can find the local socket to
talk to pipewire.

It searches for the socket named pipewire-0 in:

$PIPEWIRE_RUNTIME_DIR
$XDG_RUNTIME_DIR
$HOME
~/

I'm guessing that the cron script is running with a different user
and/or does not have
the same environment variables as the main pipewire daemon and thus
looks in a different
place and can't find a socket.

Normally the user running the daemon will set
XDG_RUNTIME_DIR=/run/user/1000 and the
socket will be named /run/user/1000/pipewire-0

Substitute 1000 for the user id.

Try this in the cron script:

PIPEWIRE_RUNTIME_DIR=/run/user/1000 pw-record

An try again. I'm pretty sure it's a socket path thing. There is no
dbus, systemd or device permissions
involved. You need to check if the cronjob can find and has
permissions to connect to the socket and
that's it.

Wim






On Wed, 7 Jul 2021 at 17:47, John Murphy <rosegardener at freeode.co.uk> wrote:
>
> Could someone please do a simple test on any Pipewire installation
> set up to use/replace Jack (or shed any light on this).
>
> If I run 'pw-record crontest.wav' it works fine, as expected.
> If I run 'pw-cat 2> errrrr.txt' ditto, of course.
>
> If I setup a user cronjob with 'crontab -e' to run the commands
> (at the start of the next minute or so) the first does nothing,
> while the second works.
>
> Cron writes to /var/log/syslog like:
>
> CRON[7694]: (john) CMD (pw-record crontest.wav)
> rtkit-daemon[1277]: Supervising 7 threads of 4 processes of 1 users
>
> (second line repeated)
>
> --
> John (older than 95.6% of the population).
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-dev


More information about the Linux-audio-dev mailing list