1
Scripting / Re: Using fe.plugin_command_bg to run SUDO
« on: June 09, 2020, 01:14:17 PM »
I think i'm getting close.
The above is working except it throws a 'Parameter word expansion failed' error. I think because its passing the rom name which has spaces in to the file path...
error log..
Code: [Select]
fe.add_transition_callback("onTransition");
function onTransition( ttype, var, ttime )
{
if ( ttype == Transition.ToNewSelection )
{
local argString = "";
fe.plugin_command_bg( "sudo", "led-image-viewer --led-rows=32 --led-cols=64 --led-chain=2 --led-slowdown-gpio=3 --led-brightness=50 --led-pwm-bits=9 --led-limit-refresh=50 --led-scan-mode=0 --led-pwm-lsb-nanoseconds=200 -C /home/pi/RetroPie/roms/" + fe.game_info( Info.Emulator ) + "/marquee/" + fe.game_info( Info.Title ) + ".png" );
}
}
The above is working except it throws a 'Parameter word expansion failed' error. I think because its passing the rom name which has spaces in to the file path...
error log..
Quote
*** Initializing display: 'Capcom Classics'
- Loaded master romlist 'Arcade' in 241 ms (96 entries kept, 9700 discarded)
- Constructed 1 filters in 0 ms (96 comparisons)
Parameter word expansion failed. [led-image-viewer --led-rows=32 --led-cols=64 --led-chain=2 --led-slowdown-gpio=3 --led-brightness=50 --led-pwm-bits=9 --led-limit-refresh=50 --led-scan-mode=0 --led-pwm-lsb-nanoseconds=200 -C /home/pi/RetroPie/roms/Arcade/marquee/X-Men Children of the Atom (Euro 950331).png].