I know similar questions have been asked and answered before, but so far nothing I've managed to find has solved my problem.
I have a python script I want to run at startup. This script uses vlc-ctrl to play audio files. It runs fine from the command line. However, I've added it to my user crontab and it isn't working because it's failing to connect to PulseAudio.
I assume this is because Pulse hasn't started before my script tells VLC to play the file. I've added a sleep before the command in the crontab but that doesn't solve the problem (even if the sleep is >30 sec). As an alternative, I've created a shell script that calls the python file, but that too fails, even when it sleeps first.
Anybody experience a similar issue or have ideas on how to resolve this?
I have a python script I want to run at startup. This script uses vlc-ctrl to play audio files. It runs fine from the command line. However, I've added it to my user crontab and it isn't working because it's failing to connect to PulseAudio.
Code:
[000000001180ae50] vlcpulse audio output error: PulseAudio server connection failure: Connection refused[0000000011973400] vlcpulse audio output error: PulseAudio server connection failure: Connection refused[000000001194ff20] vlcpulse audio output error: PulseAudio server connection failure: Connection refused[0000000011973400] alsa audio output error: cannot open ALSA device "default": Unknown error 524[0000000011973400] main audio output error: Audio output failed[0000000011973400] main audio output error: The audio device "default" could not be used:
Anybody experience a similar issue or have ideas on how to resolve this?
Statistics: Posted by bluez34me — Tue Apr 30, 2024 5:19 pm