I am answering myself here : I found the solution :you have to add a "&" at the end of the arecord line<br>So the file content is now :<br><br>#!/bin/bash<br>zenity --question --title="Voice-note" --text="Click Validate to START recording"; gostart=$? <br>
<br>if [ "$gostart" = 1 ]<br> then<br> echo "Operation canceled"<br> exit<br> else<br> echo "Recording..."<br>fi<br>arecord -D hw -f cd -v -t wav ~/rec-$(date +%Y-%m-%d-%H-%M).wav &<br>
alsactl -f /usr/share/openmoko/scenarios/voip-handset.state restore &<br>zenity --info --title="Voice-note" --text="Click Validate to STOP recording"; gostop=$? <br><br>killall -TERM arecord<br>alsactl -f /usr/share/openmoko/scenarios/gsmhandset.state restore<br>
zenity --info --title="Voice note" --text="Your voice-note has been recorded"; goread=$? <br><br>#END OF FILE<br><br>CONCLUSION<br>It works well !! For those who want to try, just create a executable text file called "voicenote.sh" for example in your personnal folder and add the lines above. <br>
To make it executable, please do :<br>chmod +x ~/voicenote.sh<br><br>Thanks all for your help !<br><br>Kimaidou<br><br><br><br>