On Fri, 24 Jan 2025, e...@gmx.us wrote:

> > That works for me too, but not in cron.  Could you create a temporary 
> > personal
> > cron job with crontab -e which sets
> >
> >  XDG_RUNTIME_DIR="/run/user/$(id -u)"
> >
> > and runs
> >
> >  M H * * * aplay /usr/share/sounds/alsa/Side_Left.wav
> >
> > where M is the minute 0-59 and H is the hour 0-23.  I shall do exactly the
> > same.  Roger
> 
> OK.  My crontab has this:
> 
> XDG_RUNTIME_DIR="/run/user/$(id -u)"
> 
> # m h  dom mon dow   command
>  *  *  24  1   *   aplay /export/media/sounds/woow1.wav
> 
> At the minute, no sound.  I tried
> id=$(id -u)
> XDG_RUNTIME_DIR=/run/user/$id
> and
> id=1000
> XDG_RUNTIME_DIR=/run/user/$id
> 
> and no dice.  

I suspect that in a personal crontab entry $(id -u) may not refer to the user 
but maybe to root.  Perhaps there is another way to get the user's uid.

> I tried
> XDG_RUNTIME_DIR=/run/user/1000
> and it worked.  Maybe this cron doesn't do variables in assignments?

Could you now run VLC for a short while and then rerun the personal crontab 
test with uid 1000 ?.  Thanks, Roger

Reply via email to