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

    Restart ES by commandline?

    Scheduled Pinned Locked Moved Help and Support
    emulstationcommand line
    14 Posts 6 Posters 39.6k 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 daeks

      I just want to restart ES. I do not want to reboot neither I want to use the standard quit dialog from ES by using a controller :)
      I am looking for a way to restart ES from another terminal session without interacting in any way with the TV / controller / ES.

      Currently I am using killall emulationstation && emulationstation & to restart it.

      edmaul69E M 2 Replies Last reply Reply Quote 0
      • edmaul69E
        edmaul69 @daeks
        last edited by edmaul69

        @daeks just type exit or emulationstation

        1 Reply Last reply Reply Quote 0
        • M
          Melvin.FoX @daeks
          last edited by

          @daeks you could also check for process id by ps aux commend and then type kill command with the specific process id but I still think that your option is better.
          You can always make new alias in .bashrc file to assign this long command to just one small word like eg. eskill.

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

            Currently I am struggeling with:

            export HOME=/home/pi
            export TERM="linux"
            emulationstation > /dev/tty1 2>&1 &
            

            ES gets restarted but starting a game results in "Unable to open /dev/tty"

            What I am missing here? :( @BuZz can you help?

            BuZzB 1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators @daeks
              last edited by BuZz

              Just trigger the ES launch script to restart it. Create /tmp/es-restart and send a SIGINT to es.

              [edit] corrected filename.

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                @BuZz omg, it could be simple.... thank you very much!
                My final solution was sudo openvt -c 1 -s -f emulationstation 2>&1 but your way is much more appreciated :)
                I am doing now echo "" > /tmp/es-restart && killall emulationstation

                BuZzB 1 Reply Last reply Reply Quote 1
                • BuZzB
                  BuZz administrators @daeks
                  last edited by BuZz

                  @daeks said in Restart ES by commandline?:

                  can just use touch - touch /tmp/es-restart

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                    @BuZz thanks :) do you also know a quick way to close a running game? Restarting ES while a game is running looks not very good :/

                    BuZzB 1 Reply Last reply Reply Quote 0
                    • BuZzB
                      BuZz administrators @daeks
                      last edited by

                      @daeks you can kill retroarch, but if it's something else that won't help.

                      Something like this might be better - get the child process of the runcommand process, and send a SIGINT to that.

                      kill $(pgrep -P $(pgrep -f "bash /opt/retropie/supplementary/runcommand/runcommand.sh"))
                      

                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                        @BuZz I have tested it on some emulators. it looks like that it does not catch everything. As an example scummvm is still running although the runcommand.sh was killed.

                        meleuM BuZzB 2 Replies Last reply Reply Quote 0
                        • meleuM
                          meleu @daeks
                          last edited by

                          @daeks I would try to kill the command present on 4th line of /dev/shm/runcommand.info.

                          • Useful topics
                          • joystick-selection tool
                          • rpie-art tool
                          • achievements I made
                          1 Reply Last reply Reply Quote 0
                          • BuZzB
                            BuZz administrators @daeks
                            last edited by

                            @daeks strange as it shouldn't kill runcommand but the child. You could try meleu's suggestion, or just don't allow restarting if a game is running.

                            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                            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.