For the project I'm working on I have a python script that accepts some serial input and plays sounds depending on the input. I have the script set up and it works just fine when I run it from within the GUI. If I log out of the GUI and try to run the script from the command line though the script executes just fine but my sounds don't play. I just get a momentary static click. I can tell the script is running because I have it printing debug code and the print's work just fine.
I want this script to execute when the Raspberry Pi is turned on so per this Running a Python script at startup I was going to add a line to /etc/rc.local to run the script.
If there is some reason the sounds simply won't play until the GUI starts up how would I set it up to load the GUI and then execute the script on startup without any user input?