Run a command after logging off pixel
-
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.
-
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. -
@mitu What is the general difference between
EmulationStation'sgame-end
and
RunCommand's-onend
?I'm just curious. Is the desktop seen as an "emulator" and using RunCommand when launched through ES?
-
@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.
-
@mitu Thanks!
-
@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.
-
@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 ?
-
@mitu Installed through setup script, .sh file appeared under ports yes. Should I have done it through CLI instead?
-
@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
.
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.