Help running runcommand from python script
Justblair last edited by
I have seen other posts, but not yet managed to find an answer to this one...
I am running a python script from startup that gives me remote control (using mqtt and gpio) over my retropie arcade cabinet. So far I have been able to control the volume, close down retropie etc.
On my list of things to do is to launch favorite games. I have tried this code:
def startRom(): client.publish("/Arcade/Status", "Tekken") os.system("""sudo /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ psx '/home/pi/RetroPie/roms/psx/Tekken 3 (USA).PBP'""")
The python code works if I run the script from SSH, although emulation station stubbornly stays in the foreground so I can only hear the game playing!
The python code does not work when I start it from rc.local like so sudo python /home/pi/bin/background.py --silent & (the rest of the script works just fine.