Quitting a game via command line / ssh
-
Pi Model or other hardware: Pi 4
Power Supply used: Canakit 3.5A
RetroPie Version Used: 4.7.18
Built From: Pre made SD Image on RetroPie website using the Pi imagerHello, I am trying to build kind of a custom loader that the user can choose three games from instead of having the whole emulationstation menu to contend with, this is something that I am building in the godot game engine to port over to linix with the godot emulator and run on the pi. I am running into a little road block with changing games on the fly, as the emulator for godot will be running a "game" and when the user selects a game it will switch over to that one. I have my single-game boot working fine via run command, and I tried using this script https://pastebin.com/jmNJxMcJ to kill the game, but it seems it just looks for a running emulator, which it does not find.
Any simple commands on how to switch over from one game too another on the fly like this?
Much appreciated. -
The script you linked assumes the program/emulator is started by runcommand, which is not the case here.
Find the process corresponding to your game/emulator withps -ef
and then use it's name to stop it withkillall <proc_name>
. -
@mitu
Alrighty, I gave that a shot and it gives me a list of processes and PID's but not names if I am reading it correctly, here is a pastebin of the process list, https://pastebin.com/4cGwJvUe I think the process im looking for is 508?Thank you,
-
Sorry, I'm a bit confused - I thought you'd be running your Godot based game or custom loader ? Your process list shows an arcade game started from EmulationStation, the standard RetroPie front-end.
I think the process im looking for is 508?
No, in the example list you'd need to stop
retroarch
, which is started fromruncommand
. -
@mitu ah sick that worked to kill the game, here is the pastbin for the godot-engine, im assuming i should try killall godo-engine?
-
@mitu sorry for the double post, I see the paste cut off some of the output, here is an updated pastebin https://pastebin.com/BnNU3EEM
-
@mitu think i got it, used the following and got back to command line:
ps -ef | awk '/tester/ {print $2}' | xargs kill
-
That would catch only when you run the
tester.zip
rom, it' better to match ongodot-engine
if the name of the process (frt_3.3.2_pi2.bin
) has such an obscure name. -
@mitu ah perfect that worked too, thank you very much!
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.