Emulationstation Shutdown Script Issue
-
I added a very simple script to my front end on emulationstation to give myself a "shutdown" button next to all the consoles. Here's what I've done:
In es_systems.cfg:
<system>
<name>power</name>
<fullname>Power Menu</fullname>
<path>~/RetroPie/roms/power</path>
<extension>.sh .SH</extension>
<command>sudo bash %ROM%</command>
<platform>linux</platform>
<theme>power</theme>
</system>Shutdown.sh contains:
sudo shutdown -h nowThe script actually works just fine and shuts down the system.
Here's the issue...
If I've added any games to my "favorites" folder in emulationstation, when I reboot the system, they are gone.
If I use the original shutdown in the emulationstation menu, I can shutdown with the favorites still being there.
Any idea what I'm doing wrong with that script that is causing the favorites not to get saved when the system shuts down?
-
t looks like your system is performing a hard/fast shutdown without saving metadata or favorites first, like RetroPie shutdown does.
I believe this is related to EmulationStation. You need to find a way for EmulationStation to save the changes before the shutdown occurs. -
@sugarfree said in Emulationstation Shutdown Script Issue:
t looks like your system is performing a hard/fast shutdown without saving metadata or favorites first, like RetroPie shutdown does.
I believe this is related to EmulationStation. You need to find a way for EmulationStation to save the changes before the shutdown occurs.Hmm… that would make sense. Is there a command to kill a process properly that shuts it down with saving data? I tried adding “kill emulationstation” in the script, which did work for shutting down es but same results with data not being saved.
-
@TPR You have to make ES to save the changes not to kill it .
You can try emulationstation -h in the terminal to see all available options. -
@sugarfree said in Emulationstation Shutdown Script Issue:
@TPR You have to make ES to save the changes not to kill it .
You can try emulationstation -h in the terminal to see all available options.Doesn't seem to be much here for quitting the application:
-
In ES there is a menuitem Save Metadata, set it to Always. Then you should be able to hard kill ES via shutdown/reboot without losing changes to gamelists / favorites / collections.
-
@Lolonois said in Emulationstation Shutdown Script Issue:
In ES there is a menuitem Save Metadata, set it to Always. Then you should be able to hard kill ES via shutdown/reboot without losing changes to gamelists / favorites / collections.
BAM!!!
That worked!
Thank you! Not sure how I never noticed that option before! Almost seems like “always” should be the default.
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.