If I give a command like:
$ mplayer ~/sounds/mysound.wav
then it works and plays a sound. If I sleep before playing the sound, then it also works:
$ sleep 5s && mplayer ~/sounds/mysound.wav
However, if I try to sleep and make it a background process then it gives a cannot-connect-to-socket error:
$ sleep 5s && mplayer ~/sounds/mysound.wav &
I tried setting lirc=no in the mplayer config and that just caused the background process to hang. How can I get this to work?