Skip to content

Instantly share code, notes, and snippets.

@neontuna
Last active July 10, 2019 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neontuna/d8958f2cdb29f217dad9842f9923aa91 to your computer and use it in GitHub Desktop.
Save neontuna/d8958f2cdb29f217dad9842f9923aa91 to your computer and use it in GitHub Desktop.

Enable SSH on the Retropie, will be easier to go back if needed

Edit /opt/retropie/configs/all/autostart.sh

Replace emulationstation #auto with the following

ls ~/RetroPie/roms/gb |sort -R |tail -1 |while read file; do
	trimfile=$(echo $file | rev | cut -c 4- | rev)
	/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ gb ~/RetroPie/roms/gb/"$trimfile".7z
done

A few things to note here

  • emulationstation/runcommand.sh does not handle files with spaces very well, and you can't just wrap the entire path in quotes "like/this path with/spaces.7z". Instead you literally wrap just the file name in quotes.
  • My test roms all had the .7z extension on them. So that second line there is trimming the extension off the filename, since you also can't just wrap the filename + extension in quotes. like/this/"file name with spaces.7z"

RetroPie FAQ link - https://retropie.org.uk/docs/FAQ/#how-would-i-start-from-command-line-say-the-snes-emulator-by-itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment