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

    Trying to start python script with runcommand-onstart/end

    Scheduled Pinned Locked Moved Help and Support
    run commandpython
    2 Posts 2 Posters 358 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.
    • D
      djkylian
      last edited by

      I have a python script that runs a demo led (gpo) sequence loop on my buttons which is also triggered to stop by a PIR sensor (vegas mode or gambling machine light show) that i like to run when retropie is in the menu's and a full on python script that i like to run when a game runs.

      Therefor i figured out this can be done with the runcommand-onstart.sh and runcommand-onend.sh

      In those files i tried calling "sudo python allon.py" etc. as the files are in the same directory and I also tried naming those files to "runcommand-onstart.py" etc. (Found online that both can be used) But none of those seem to work.

      Do i also need to add some instructions to the "runcommand.cfg"

      1 Reply Last reply Reply Quote 0
      • Z
        zerojay
        last edited by zerojay

        Try running it with full paths to both the python executable and your python script. No need for anything in runcommand.cfg.

        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.