Homepage › Forums › RetroPie Project › Ideas for Further Enhancements › Music on Boot Menu? › Reply To: Music on Boot Menu?
		11/16/2015 at 23:56
		
		#110074
		
		
		
	
Participant
		
		
	One quick way is to run a script in the background checking for the existence of a few processes. The bash script should work if you use all RetroArch emulators, and will play random mp3s in the background until a game is launched.
#!/bin/bash
while true; do
RA=$(pgrep retroarch)
ES=$(pgrep emulationstat)
M123=$(pgrep mpg123)
if [ "$RA" ]; then
  pkill mpg123
elif [ ! "$RA" ] && [ ! "$M123" ] && [ "$ES" ]; then
  mpg123 -q -Z ~/RetroPie/media/mp3/* &>/dev/null &
fi
sleep 1
done