Attract-Mode Support > Scripting

Trying to get "Attract Mode Setup" running

(1/1)

Joelf:
Hello, This is on a rasberri pi.  I've received a bunch of scripts that do things like shutdown or open the audio settings, I nabbed them from a unified theme.

Here is an example of one of the scripts - this one brings up audio settings it's called audio settings.sh


--- Code: ---#!/usr/bin/env bash
sudo /home/pi/RetroPie-Setup/retropie_packages.sh retropiemenu launch /home/pi/RetroPie/retropiemenu/audiosettings.rp

--- End code ---

I created a romlist for them, and a CFG file.


--- Code: ---rompath              /home/pi/RetroPie/roms/Attract Mode Setup
romext               .sh
system               Attract Mode Setup
artwork    flyer           /home/pi/RetroPie/roms/Attract Mode Setup/flyer
artwork    marquee         /home/pi/RetroPie/roms/Attract Mode Setup/marquee
artwork    snap            /home/pi/RetroPie/roms/Attract Mode Setup/snap
artwork    wheel           /home/pi/RetroPie/roms/Attract Mode Setup/wheel

--- End code ---

As you can see I put the scripts in the roms folder. I think there is something wrong with the CFG file. Whenever I click on a script, it throws an error:


--- Code: ---*** Running:
Error executing:
--- End code ---


And that's all it tells me. Can someone who has a bit more experience running script files through Attract Mode give me a hint in what's going wrong?

Thanks!

Joelf:
One thing that is working are all the snaps and wheel art from this folder.

progets:
Pi F.A.Q. # 9 http://forum.attractmode.org/index.php?topic=1249.0.

You don't have an executable or argument in your .cfg file.

--- Code: ---executable           /bin/bash
args                 "[romfilename]"

--- End code ---

You also need to make your scripts executable.

--- Code: ---sudo chmod +x "/home/pi/RetroPie/roms/Attract Mode Setup/*.sh"

--- End code ---

Joelf:
So the chmod couldn't locate the directory, i thought it might be because of the space, I changed it to "setup", and updated the cfg file to point to that:


--- Code: ---rompath              /home/pi/RetroPie/roms/setup
system               Attract Mode Setup
executable           /bin/bash
args                 "[romfilename]"
artwork    flyer           /home/pi/RetroPie/roms/setup/flyer
artwork    marquee         /home/pi/RetroPie/roms/setup/marquee
artwork    snap            /home/pi/RetroPie/roms/setup/snap
artwork    wheel           /home/pi/RetroPie/roms/setup/wheel
--- End code ---

I can CD into the directory, but I can't sudo chmod into it. it says

--- Code: --- cannot access ‘/home/pi/RetroPie/roms/setup/*.sh’: No such file or directory
--- End code ---

Although I just CD'd right into it. I figured it was a folder permission error, and I went into sftp program and changed the permissions on all the files and the folder to 777, not knowing how else to do this.

The box art, etc. shows up, so the romlist has found the proper folder.

When I run a script from the UI it says


--- Code: ---Could not locate rom ... best guess "/home/pi/RetroPie/roms/setup/Run Command"
--- End code ---

So weird. I notice it's not putting the .sh at the end of the best guess. Is something missing from the CFG still?

Thanks.

Joelf:
AH! got it . I accidentally removed


--- Code: ---romext               .sh
--- End code ---

Navigation

[0] Message Index

Go to full version