On 23/06/2021 20.16, Yamaban wrote:
On Wed, 23 Jun 2021 19:47, Carlos E. R.
wrote: On Wednesday, 2021-06-23 at 19:27 +0200, Carlos E. R. wrote:
Well, disabling cron job clock speach again.
I have other scripts that try to produce sounds in background to tell me things that are not working since months for one or another reason.
A hint for your sound from cron vs sound from termial: Compare the output of /usr/bin/env from a script called via cron and the same script called from a termial.
Yes, I was thinking of that. However, it is something that worked on 15.1 and failed on 15.2, if I recall correctly. On my ToDo list I have to migrate from pulse running as user to running as a system daemon so that any user on the machine can use it, just no hurry. Thus, before investigating the cron problem I would like to do the service migration first. But thanks for the ideas :-)
In my case (was on a Leap 42.2) I've had to set & export some variables:
--------------- bash code start here xt=$(echo /tmp/.ICE-unix/*) test -z "$SESSION_MANAGER" && export SESSION_MANAGER=local/${HOST}:@$xt,unix/${HOST}:$xt test -z "$XAUTHORITY" && export XAUTHORITY=$HOME/.Xauthority test -z "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR=/run/user/$UID test -z "$ALSA_CONFIG_PATH" && export ALSA_CONFIG_PATH=/etc/alsa-pulse.conf test -z "$AUDIODRIVER" && export AUDIODRIVER=pulseaudio test -z "$SDL_AUDIODRIVER" && export SDL_AUDIODRIVER=pulse --------------- bash code end here
also for diagnosis running
pacmd info >>/tmp/pacmd.log
in your script gives hints that would otherwise be missed
HtH - Yamaban.
-- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)