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

    Stopping emulators from terminal?

    Scheduled Pinned Locked Moved Help and Support
    terminalemulator
    4 Posts 2 Posters 1.2k 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.
    • daeksD
      daeks
      last edited by

      Hi,

      I have a quick question about the terminal functionallity: Is there a common way/script which allows me to quit the currently running emulator from a terminal session? How could I archive that?

      meleuM 1 Reply Last reply Reply Quote 0
      • meleuM
        meleu @daeks
        last edited by meleu

        @daeks You need:

        • pgrep
        • kill
        • tail
        • /dev/shm/runcommand.info

        How to do it:

        1. Get the last (4th) line of runcommand.info with tail. It's the full command line used to launch the most recent launched emulator.
        2. Check if this command is still running with pgrep.
        3. If it's running, kill it!

        I can't give you a script now cause I'm away from my RetroPie...

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        daeksD 1 Reply Last reply Reply Quote 1
        • daeksD
          daeks @meleu
          last edited by

          @meleu thanks :) that will help me alot as a starting point. If you have access to your instance later on, it would be really nice to share a script :)

          1 Reply Last reply Reply Quote 0
          • daeksD
            daeks
            last edited by daeks

            I tried to setup a script and possible extension for retropie here: https://github.com/daeks/jslisten-abort
            The intention of this extension is to be able to kill all emulators only with a controller (for example: scummvm if you have no keyboard available)

            Unfortunately emulators like scummvm are started with bash script. Is there a better way to fetch the binary for such emulators?

            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.