Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Need Help creating shutdown shell script
Tagged: childproof
- This topic has 7 replies, 5 voices, and was last updated 8 years, 11 months ago by zigurana.
-
AuthorPosts
-
09/29/2015 at 18:04 #107062majerle9Participant
Total noob and don’t really know what I’m doing. I’d love it if someone could help me with this.
I want to be able to create a Shutdown option inside of my system menu. It will be in my list of ROMs so it will shutdown the system without having to use the EmulationStation menu. That way I can disable the Select and Start buttons in EmulationStation to make it childproof and not let anyone accidentally change my settings.
In es_systems.cfg I changed NES to allow .sh extensions.
<system>
<name>nes</name>
<fullname>Nintendo Entertainment System</fullname>
<path>~/RetroPie/roms/nes</path>
<extension>.nes .zip .NES .ZIP .sh</extension>
<command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes %ROM%</command>
<platform>nes</platform>
<theme>nes</theme>
</system>Now I would like to create a shutdown.sh file to get it to turn the system off. I have no idea how to do that. I was hoping someone could help me out. I’m guessing it would look something like this only much better and actually functional:
#!/bin/bash /sbin/shutdown -h -P now
Can someone help me write this? Will it even work? Or am I way off track trying to set this up?
09/30/2015 at 15:34 #107108momaw27ParticipantHmmm, this sounds like a good idea. If at all possible, I’d like to have the script shutdown in such a way that the ‘number of times played’ function in ES saves properly as well.
Thanks!
10/05/2015 at 08:16 #107305majerle9ParticipantI would love that as well. I’m trying to figure out if there is a way to quit Emulationstation that doesn’t involve F4 or using the EmulationStation GUI menu.
10/09/2015 at 17:45 #107526smithersParticipantHi.
This is entirely possible. It is something I am going to implement on my arcade cab when I get round to it, but I will be creating a ‘Power’ menu with its own theme etc. I will happily share when I have it up and running.The script I will use is:
sudo poweroff
It seems to shut the Pi down in the normal manner, however if anyone would care to correct me then go ahead – I could be wrong! I know there are shutdown commands to halt process etc. But the command above looks as though it halts the system the same as a normal shutdown via the emulation station ‘start menu’ would to me?
10/23/2015 at 09:46 #108226smithersParticipantHi.
I finally got round to creating a ‘Power’ option in Emulation Station. It works great from what I have tested so far.
I have an idea of how I would like it to look and feel but I am terrible with graphics design so it is very basic looking at the moment.
I will upload a video tonight and show you my idea, but basically I intend for there to be no gamelist inside the theme and instead only pictures of power and reboot buttons. Hope that makes sense but you will see what I mean in the video!
Cheers.
Steve10/23/2015 at 21:17 #108248smithersParticipantOK as promised, here is a video of what I have set up:
Need to sort out some decent looking power icons but otherwise it works great! It could also be used to create a custom script every time you shutdown, ie to switch a boot partition etc.
If anyone artistic would care to create a set of good looking power buttons then that would be great!
Let me know if you would like a copy of what I have so far.
Cheers.
Steve11/06/2015 at 17:31 #109301nosedeathParticipantI just watched the video…Very nice, I like that a lot. Ya I’d love to see what you did. Now I’m not very Linux savvy so go easy.
12/13/2015 at 14:29 #111735 -
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.