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

    Start ROM with script or Emulationstation

    Scheduled Pinned Locked Moved Help and Support
    command-linelinuxraspberry pi 3
    2 Posts 1 Posters 812 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.
    • X
      xskull
      last edited by

      Hello,

      I'm running version 4.2 of RetroPie on a Pi3. I'm building a small web interface that can be accessed within my home network to get play stats, game searching, etc. The web interface is local on the Pi. What I would like to also do is be able to launch the ROM from that interface or directly on the system using Emulationstation.

      Ideally, Emulationstation is already running, the user selects a ROM from the webapp and a script kicks off a ROM which will take over the screen. Once the user exits the ROM the screen returns to Emulationstation.

      Using the runcommand, I was able to start the ROM, but it was in the background. I tried using openvt / chvt to swtich terminals. I used the options "-c 1 -s -f -w -- <path to script>" which gave me the same result.

      I then thought, perhaps I need to stop Emulationstation. I created a copy of the runcommand script, and this called the onstart and onend scripts. I then killed the emulation station in onstart and started it again on the onend.

      Stopping emulation station brought me the closet results. But I am curious if there is a way I can keep it running and just bring the ROM to the foreground. Please let me know if you have any thoughts or suggestions.

      Thanks,
      -Kevin

      1 Reply Last reply Reply Quote 0
      • X
        xskull
        last edited by

        Slight correction to my above post. After restarting the pi, the stop emulationstation and start emulationstation script no longer works. It is stopping emulationstation but no longer will resume it.

        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.