Hey guys,
When selecting RetroPie as the startup from dietpi-autostart, what script is being used and where is it located in order to call up emulationstation?
I'm looking to inject a few commands right before emulationstation begins in order to connect a few wii remotes via wminput.
RetroPie Auto Startup Script
Re: RetroPie Auto Startup Script
Here she isGaM3r2Xtreme wrote:Hey guys,
When selecting RetroPie as the startup from dietpi-autostart, what script is being used and where is it located in order to call up emulationstation?
I'm looking to inject a few commands right before emulationstation begins in order to connect a few wii remotes via wminput.

Code: Select all
/opt/retropie/supplementary/emulationstation/emulationstation
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
-
- Posts: 10
- Joined: Thu Jun 02, 2016 4:00 am
Re: RetroPie Auto Startup Script
That's what I'm talking about. Thanks!
-
- Posts: 10
- Joined: Thu Jun 02, 2016 4:00 am
Re: RetroPie Auto Startup Script
Hey Fourdee,
I hate to revive this thread, but the issue I just noticed involves the auto startup script.
Alright, so currently the autostart calls the emulationstation binary directly, which works nice until a user decides to use the Quit menu within emulationstation. The user would not be able to restart or shutdown the system nor restart emulationstation. All selections would lead to emulationstation closing out to the terminal.
My solution is this, instead of having the login script call the emulationstation binary directly like this:
The emulationstation script should be called instead, which then calls the binary:
The emulationstation.sh looks like this:
I found that the emulationstation binary ends up creating a temp file acting like a flag for the shutdown/restart options. During the shutdown of emulationstation, one of the three files is created by the binary and then analyzed by the script.
I found this out with a little help from the Retropie community in the following thread and figured I should share the knowledge:
https://retropie.org.uk/forum/topic/483 ... own-script
I hate to revive this thread, but the issue I just noticed involves the auto startup script.
Alright, so currently the autostart calls the emulationstation binary directly, which works nice until a user decides to use the Quit menu within emulationstation. The user would not be able to restart or shutdown the system nor restart emulationstation. All selections would lead to emulationstation closing out to the terminal.
My solution is this, instead of having the login script call the emulationstation binary directly like this:
Code: Select all
#RetroPie/Emulation station
elif (( $AUTO_START_INDEX == 3 )); then
#emulationstation - can no longer be run as root
/opt/retropie/supplementary/emulationstation/emulationstation
Code: Select all
/opt/retropie/supplementary/emulationstation/emulationstation.sh
Code: Select all
#!/bin/sh
esdir="$(dirname $0)"
while true; do
rm -f /tmp/es-restart /tmp/es-sysrestart /tmp/es-shutdown
"$esdir/emulationstation" "$@"
[ -f /tmp/es-restart ] && continue
if [ -f /tmp/es-sysrestart ]; then
rm -f /tmp/es-sysrestart
sudo reboot
break
fi
if [ -f /tmp/es-shutdown ]; then
rm -f /tmp/es-shutdown
sudo poweroff
break
fi
break
done
I found this out with a little help from the Retropie community in the following thread and figured I should share the knowledge:
https://retropie.org.uk/forum/topic/483 ... own-script
Re: RetroPie Auto Startup Script
Hi,GaM3r2Xtreme wrote: I found that the emulationstation binary ends up creating a temp file acting like a flag for the shutdown/restart options. During the shutdown of emulationstation, one of the three files is created by the binary and then analyzed by the script.
I found this out with a little help from the Retropie community in the following thread and figured I should share the knowledge:
https://retropie.org.uk/forum/topic/483 ... own-script
Excellent, thank you for letting us know.
I'll update the login script to use /opt/retropie/supplementary/emulationstation/emulationstation.sh for v137.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: RetroPie Auto Startup Script
Hello, I would like to ask if I select Retropie on autostart, is there an option to go back to retropie?