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

    Run a command after logging off pixel

    Scheduled Pinned Locked Moved Help and Support
    pixel desktopruncommandlog off
    9 Posts 3 Posters 640 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.
    • Guy 0G
      Guy 0
      last edited by

      Hi Guys,

      Just wondering if there is a way of automatically run a certain command when returning to ES after logging off Pixel desktop (exit to command line option if launched from ES).

      So basically executed after logging off Pixel desktop.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        EmulationStation has some scripting support, you can run scripts when certain events happen (game start/end, screensaver starts, etc.). You can add your own script for the game-end event and run the commands you want.
        More details in the EmulationStation doc page.

        1 Reply Last reply Reply Quote 0
        • IanDaemonI
          IanDaemon
          last edited by IanDaemon

          @mitu What is the general difference between
          EmulationStation's game-end and
          RunCommand's -onend?

          I'm just curious. Is the desktop seen as an "emulator" and using RunCommand when launched through ES?

          • 5 Favorite Arcade Games in MAME
          • Cocktail Cabinet Games
          • Check out the MAME RoW
          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @IanDaemon
            last edited by mitu

            @iandaemon practically, there isn't much. Runcommand knows about your game/system/etc., while EmulationStation doesn't (for the game-end event).
            In theory, you can run any game directly without Runcommand, so using ES's mechanism seems the right way to configure this.

            I'm just curious. Is the desktop seen as an "emulator" and using RunCommand when launched through ES?

            Yes.

            IanDaemonI 1 Reply Last reply Reply Quote 1
            • IanDaemonI
              IanDaemon @mitu
              last edited by

              @mitu Thanks!

              • 5 Favorite Arcade Games in MAME
              • Cocktail Cabinet Games
              • Check out the MAME RoW
              1 Reply Last reply Reply Quote 0
              • Guy 0G
                Guy 0
                last edited by Guy 0

                @mitu thanks, worked jus fine, game-end did the trick.

                Interestingly runcommand-onstart wasn't being called when running startx (from ES) and neither the onend when returning to ES.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @Guy 0
                  last edited by

                  @guy-0 said in Run a command after logging off pixel:

                  Interestingly runcommand-onstart wasn't being called when running startx (from ES) and neither the onend when returning to ES.

                  Did you install the desktop as a Port or just added the entry in EmulationStation yourself ?

                  1 Reply Last reply Reply Quote 0
                  • Guy 0G
                    Guy 0
                    last edited by

                    @mitu Installed through setup script, .sh file appeared under ports yes. Should I have done it through CLI instead?

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @Guy 0
                      last edited by

                      @guy-0 said in Run a command after logging off pixel:

                      Should I have done it through CLI instead?

                      No, installing from RetroPie-Setup is fine. I wonder why the onstart script doesn't work though, the desktop is launched via runcommand.

                      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.