Azsorlex26
Posts: 16
Joined: Sat Feb 10, 2018 8:41 am
Location: Australia

Trouble with setting up RetroPie in a custom script

Wed Jul 25, 2018 11:11 am

So, what I'm trying to do is create a custom script that will set up my pi from a clean installation of Raspbian Lite, though every time I test it, I keep running into a specific problem. When it comes to setting up RetroPie (executed by the below line), and I perform a basic installation, remove usbromservice, and install pixel desktop, my script will abruptly end when I exit the installer.

Code: Select all

sudo ./retropie_setup.sh
I noticed that when I exit the installer right after it loads, the script will continue on, but this isn't what I want, since the desktop has to be installed for the tasks afterwards, and also since I just want to install RetroPie in one go.

If I were to make an educated guess about what's going on, I'd say that the RetroPie setup script is cancelling itself after it completes an operation, which in turn cancels my script, and then reloads itself and not my script. A possible workaround that comes to mind is that I could place the commands necessary for my particular setup directly into my script the same way raspi-config settings can be altered by commands (below line as an example), which would set up the things necessary while not exiting out of my script.

Code: Select all

sudo raspi-config nonint do_ssh 0
How can I do this if possible, and if not, how else can I fix this annoying problem?

User avatar
The Traveler
Posts: 360
Joined: Sat Oct 21, 2017 3:48 pm

Re: Trouble with setting up RetroPie in a custom script

Wed Jul 25, 2018 12:57 pm

Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

Rascas
Posts: 461
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: Trouble with setting up RetroPie in a custom script

Thu Jul 26, 2018 2:47 am

I am not sure if that is what you want but you can also call some commands from the RetroPie Script without running the GUI. If you take a look at the code:

Code: Select all

sudo __nodialog=1 ./retropie_packages.sh setup basic_install
This will install RetroPie silently, for example.

Azsorlex26
Posts: 16
Joined: Sat Feb 10, 2018 8:41 am
Location: Australia

Re: Trouble with setting up RetroPie in a custom script

Sun Jul 29, 2018 12:59 am

Rascas wrote:
Thu Jul 26, 2018 2:47 am
I am not sure if that is what you want but you can also call some commands from the RetroPie Script without running the GUI. If you take a look at the code:

Code: Select all

sudo __nodialog=1 ./retropie_packages.sh setup basic_install
This will install RetroPie silently, for example.
So I've figured out how to add the desktop using the same formula you've given above.

Code: Select all

sudo ./retropie_packages.sh raspbiantools lxde
Though I still haven't been able to find how to do some other things like remove or add packages, or alter settings. What I'm trying to do now is to remove usbromservice and splashscreen, add scraper, and set the system to boot to the desktop. I've tried looking at the code for RetroPie-Setup, but I still have no idea how even the previous two commands work; I just found it through trial and error.

Return to “Gaming”