To be clear, I'm happy that it doesn't when my cron job alarm clock goes off and the headphones have been pushed off my head when I went to sleep streaming audio from youtube, but it is inconsistent.
How can I fix it?
Edit for clarity: It's not a cron environment problem. It also happens if I open an xterm and launch it that way.