RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Help running runcommand from python script

    Scheduled Pinned Locked Moved Help and Support
    pythonremote
    1 Posts 1 Posters 696 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      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.

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.