runcommand.sh should run commands
-
Can anyone explain to me how the hell to make runcommand.sh just ... run .... commands .... why doesn't it just run commands .... why doesn't it ... just .... run .... commands why doesn't it just run commands
How do I make it just run a command?
"go edit some cfg file to ..." No. How do I make it just run a command?
It's called runcommand.sh
It should just run commands.
There should be some way to have it just run a command.
Just run.
A command.
I may be looking at this wrong, but it looks like there isn't a way to have it just run a command.
How many Tide pods did whoever wrote that eat to make them not realize that sometimes people are going to want to just run commands?
I'm using latest RetroPie on Raspberry PI 400. And I want to add a .sh file as menu item to the Ports menu that will run any arbitrary linux command I put in the .sh file. I believe that's all the technical information I need to specify for this issue but please let me know why additional information is required if it is.
There needs to be a default way to add a menu item that will run any arbitrary Linux terminal command without having to edit any other files and then resume EmulationStation when it's done. Or at least some way to turn that on. Or it needs to be in the documentation and easy to find.
Am I wrong?
-
It should be as simple as putting your
.sh
files in~/RetroPie/retropiemenu
or~/RetroPie/roms/ports
and then run them from the "RetroPie" or "Ports" menu in EmulationStation. -
@benmclean said in runcommand.sh should run commands:
How many Tide pods did whoever wrote that eat to make them not realize that sometimes people are going to want to just run commands?
write your own script or stop being obnoxious.
I'm using latest RetroPie on Raspberry PI 400. And I want to add a .sh file as menu item to the Ports menu that will run any arbitrary linux command I put in the .sh file. I believe that's all the technical information I need to specify for this issue but please let me know why additional information is required if it is.
i expect your script is bogus (show it) or you've not given it +x permissions. either way, you can progress this issues after some time spent reflecting how to ask for assistance with free software.
-
?sometimes I wonder if users are confusing 'runcommand.sh' with the actual command prompt?
-
@sleve_mcdichael said in runcommand.sh should run commands:
It should be as simple as putting your .sh files in ~/RetroPie/retropiemenu or ~/RetroPie/roms/ports and then run them from the "RetroPie" or "Ports" menu in EmulationStation.
OK that is good advice, but what I was trying to do was a bit different.
When starting the emulators from the menu, runcommand.sh gives you a few seconds of delay during which you can open the configuration menu, and even cancel if you want. This is good for when you press the wrong button to start a game you did not actually want to start.
What I wanted to do was to make it so you can wrap any arbitrary command as a parameter to runcommand.sh which would give you a few seconds of delay with that config menu to grant the option to cancel running that arbitrary command.
-
@benmclean said in runcommand.sh should run commands:
What I wanted to do was to make it so you can wrap any arbitrary command as a parameter to runcommand.sh which would give you a few seconds of delay with that config menu to grant the option to cancel running that arbitrary command.
Okay, and these don't use the runcommand launch dialog because they don't use
runcommand.sh
; "RetroPie" menu usesretropie_packages.sh
and "Ports" menu just usesbash %ROM%
.It might work if you add a new system platform: "Scripts."
Start by adding the system to your
~/.emulationstation/es_systrms.cfg
file (if the file does not exist, copy it from/etc/emulationstation/es_systems.cfg
; custom edits must be made in~/.emulationstation
because the one in/etc
gets overwritten periodically.) Copy an existing entry and change everything to "scripts." Make.sh .SH
the extensions. You don't need a "platform" for scraping box art. "Theme" is optional, and requires a compatible system theme to do anything:<system> <name>scripts</name> <fullname>Bash Scripts</fullname> <path>/home/pi/RetroPie/roms/scripts</path> <extension>.sh .SH</extension> <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ scripts %ROM%</command> <theme>scripts</theme> </system>
Next you need a config folder for the system. The
<command>
used tells it to look in$CONFIGDIR/scripts
for a file calledemulators.cfg
so let's make sure it can find them: create the directory/folder/opt/retropie/configs/scripts
and inside the directory, make the file/opt/retropie/configs/scripts/emulators.cfg
.emulators.cfg
should have the following text:binbash = "bash %ROM%" default = "binbash"
Finally, you just need to create the
~/RetroPie/roms/scripts
folder and place your.sh
scripts in there. If everything works like I think it should, this should use theruncommand.sh
launch dialog giving you the option to engage the menu and cancel the launch, or if not, run the script withbash
just like the "Ports" menu would.Edit: you can add this to any platform's menu by adding
.sh .SH
to the platform's extensions ines_systems.cfg
and adding thebinbash = "bash %ROM%"
line to itsemulators.cfg
file. Don't change the default emulator for the platform ; you'll have to use the runcommand dialog once to change the emulator on a per-item basis to use thebinbash
option. -
Just add your scripts to the retropie menu, very simple. i never had to make any edits to make it work, just some editing to get the script to have a picture in EmulationStation and description of the script.
If you want the scripts to appear within your Ports, you might need to include .sh with the filetypes that are supported with Ports even though from memory it should already be set up like that (i cant double checking this right now, currently making a backup of my SSD)
If you can see the scripts in EmulationStation but theyre just not executing after selecting them, then you will need to chmod +x your sh files.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.