Multi Printer setup using gcode shell command does not play audio unless command used multiple times and only on second printer when shell script is run in background (&) #446
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Linux Distribution
Ubuntu 23.10.1
What happened
When trying to run a shell script that should play audio using aplay that runs in the background with & at the end of it some commands to not run unless you try to run them multiple times. It seems running it 3 times will get it to finally play the audio. The command itself seems to run as I have added echo TEST to it and it does show in the console but the audio just does not play. If the & is removed from the file it will play just fine every time though.
The weirdest thing is this ONLY happens on my second printer on the same computer. One is named E3 and the other S8 and the S8 one had the problem but not the E3 one despite the script being the same, the wav file being the same, and the config file being the same across both printer configs.
Broken one:
Working one:
What did you expect to happen
Wav file to be played when the command is sent the first time and on both printers of a multi printer setup
How to reproduce
Include a & at the end of the script file. Happens for TTS ones as well using espeak.
Additional information
I have allso tried changing the command run from s
h /scriptfilenametobash /scriptfilenameto/scriptfilenameand also tried changing#!/bin/bashto#!/bin/shwith no luck either