Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Running a music player via cron

1 réponse
Avatar
Jean-Philippe MENGUAL
Hello,

Since some Sid update (about 2 weeks), something may have happent in te
audio stack or the terminal because what worked no longer works.

So I am under Sid, MATE desktop, via lightdm, pulseaudio,
systemd, etc. Ont minor thing is that if I run an audio as a user or
root at boot before login invia lightem, audio does not work, but well...

Anyway, here I want to run mpv via a cron job under my regular user. The
command works, but via cron, I get an audio access problem.

The command:
killall mpv;/home/jp/radio 10 100

The result:


TERM environment variable not set.
setleds: Error reading current flags setting. Maybe you are not on the
console?: ioctl KDGKBLED: Ioctl() inapproprié pour un périphérique
TERM environment variable not set.
CTRL+C to exit
Playing: http://direct.franceinfo.fr/live/franceinfo-midfi.mp3
 (+) Audio --aid=1 (mp3 1ch 44100Hz)
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: Device or resource busy
[ao/oss] Can't open audio device /dev/dsp: Device or resource busy
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,
skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,
skipping unlock
[ao/jack] cannot open server
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
couldn't open play stream: Device or resource busy
[ao/sndio] can't open sndio default
[ao] Failed to initialize audio driver 'sndio'
Could not open/initialize audio device -> no sound.
Audio: no audio
: 00:00:00 / 00:00:00 (0%) Cache:  0s


Exiting... (Errors when loading file)
TERM environment variable not set.


TERM environment variable not set.

Same with:
killall mpv;env DISPLAY=:0 /home/jp/radio 10 100

Here is the script:
https://paste.debian.net/1102308/

Thanks for your help


Regards








--
Jean-Philippe MENGUAL

1 réponse

Avatar
Jean-Philippe MENGUAL
oops mauvais aiguillage, désolé
Jean-Philippe MENGUAL
Le 25/09/2019 à 17:17, Jean-Philippe MENGUAL a écrit :
Hello,
Since some Sid update (about 2 weeks), something may have happent in te
audio stack or the terminal because what worked no longer works.
So I am under Sid, MATE desktop, via lightdm, pulseaudio,
systemd, etc. Ont minor thing is that if I run an audio as a user or
root at boot before login invia lightem, audio does not work, but well...
Anyway, here I want to run mpv via a cron job under my regular user. The
command works, but via cron, I get an audio access problem.
The command:
killall mpv;/home/jp/radio 10 100
The result:
TERM environment variable not set.
setleds: Error reading current flags setting. Maybe you are not on the
console?: ioctl KDGKBLED: Ioctl() inapproprié pour un périphérique
TERM environment variable not set.
CTRL+C to exit
Playing: http://direct.franceinfo.fr/live/franceinfo-midfi.mp3
 (+) Audio --aid=1 (mp3 1ch 44100Hz)
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: Device or resource busy
[ao/oss] Can't open audio device /dev/dsp: Device or resource busy
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,
skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1,
skipping unlock
[ao/jack] cannot open server
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
couldn't open play stream: Device or resource busy
[ao/sndio] can't open sndio default
[ao] Failed to initialize audio driver 'sndio'
Could not open/initialize audio device -> no sound.
Audio: no audio
: 00:00:00 / 00:00:00 (0%) Cache:  0s
Exiting... (Errors when loading file)
TERM environment variable not set.
TERM environment variable not set.
Same with:
killall mpv;env DISPLAY=:0 /home/jp/radio 10 100
Here is the script:
https://paste.debian.net/1102308/
Thanks for your help
Regards