Web lists-archives.com

Re: Problem pulseaudio




On Tue, 01 Aug 2017 08:30:57 +0200, MENGUAL Jean-Philippe wrote:

> Hi,
> 
> 
> My purpose is to run mplayer in a crontab. My line:
> 
> 00 00 * * * mplayer file
> 
> 
> If I run mplayer in CLI, everything is good. If cron does it, no sound.
> And log is: Audio becomes stuck!
> 
> 
> displayed permanently in the MPlayer screen.
> 
> 
> I use a fresh testing.
> 
> 
> I have just changed to mpv. Here no such logs after crontab, but still
> no sound.
> 
> 
> How can I get more logs? Should I reportbug to mpv or pulseaudio? Where
> could I check? Not a permission problem on Pulseaudio as cron user would
> run mpv instead of my regular user?
> 

I had a similar problem when wanted to run vlc in a crontab. The solution 
was to execute in crontab the following command:

env DISPLAY=:0 /home/your_username/full_path_goes_here/play_something.sh

play_something.sh contained actual bash command to run vlc with path to an 
mp3 file to play.

This way vlc get the required environment variable set by desktop session.