0

My PC's pulse audio dies whenever I open and close virtualbox windows in a certain situation.

So I tried to monitor the audio state by crontab -e.

Usually, in the commandline, $ paplay beep.wav >>err.log 2>&1 || echo "`\`date\` `" >>err.log; is enough. If no error, it adds nothing to err.log but beeping sound. If an error, it adds "... shm_open() ..." and a current timestamp to err.log without beeping sound.

But if I locate this command line in cron, it makes beep sound periodically but when failed it does not log err.log. It simply doesn't make any stderr though no beep sounds. Likewise, || echo... doesn't work, either.

4
  • Please post your crontab -l entry for this command.
    – yahol
    Commented Mar 14, 2018 at 8:37
  • @yahol , after rebooting everything works fine, thouse sound problem still persists.
    – user58029
    Commented Mar 25, 2018 at 1:30
  • How about enclosing that whole script in a file and adding the script to cron?
    – yahol
    Commented Mar 25, 2018 at 4:32
  • @yahol , Thanks for ur info. Everything works fine without adding external script. Audio problem can be reproduced by deleting any of pulse-shm-2780269722 looking files in /dev/shm/ .
    – user58029
    Commented Apr 8, 2018 at 7:44

0

You must log in to answer this question.

Browse other questions tagged .