aplay, cvlc, mplayer etc are no longer working in cronjobs, but espeak etc. are still working.
I have been using these as my alarm clocks for as long as I have had a computer and this is the first time I've had the problem. Full pathnames don't help, using DISPLAY=:0.0, doesn't help. I don't know what else to try. This is oddly on more than one linuxmint machine at the same time.
#aplay etc. no longer working in cronjobs
14 messages · Page 1 of 1 (latest)
aplay is very limited in what exact file type and encoding scheme it can play.
for a better approach, you can use cron to start audacious a few minutes before the actual alarm is due, (or have audacious always running an minimized on startup and tucked away on another virtual desktop
then, set alarm in audacious
I have been using this system ever since my first computer. The alarms are a generally combination of playing some resident .wav file as an alarm and an espeak message to tell me why there is an alarm. At times I have tried other codecs and/or players cvlc, mplayer, etc
All combinations are failing now. I have never gone a day without using these alarms on all my devices and this is the first failure I have ever encountered.
I think this is a pipewire bug
For some reason pipewire seems to prevent playing at least short sound files in a cronjob (including when they run fine outside a cronjob). I found instructions that didn’t work to try to bypass the pipewire suspend behaviour
the aplay problem still isn't solved, but for cvlc the addition of the env variable:
PULSE_SERVER=/run/user/1000/pulse/native
to the crontab makes it work.
So partially solved.
If I hadn't been so convinced the problem was with pipeline I probably would have solved it ages ago. It really is pretty obvious.
I guess I don't really understand the relationships between e.g. pulseaudio alsa and pipeline well enough.