RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    1. Home
    2. Tags
    3. runcommand
    Log in to post
    • All categories
    • N

      runcommand-onstart.sh pass data to python script

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand onstart python shell bash
      17
      0 Votes
      17 Posts
      3k Views
      meleuM

      @nemecyys said in runcommand-onstart.sh pass data to python script:

      Because im running this python script every time i run onstart.sh or onend.sh does that mean there will be LOTS of instances of it running?

      On normal typical usage, no. The runcommand script calls the onstart one and waits it finish. The way you're invoking your python script in onstart also makes it wait the python script to finish.

      Then, from what I'm seeing from the codes, I believe that there won't be lots of instances running.

      With a Bash Script:
      Would this also be the case?
      Would i want to exit the bash after running and achieving the desired result?

      There's no need.

      *also, any links to some of meleu's coding goodness?

      You can find links to some of my scripts on the "useful topics" post (link on my signature). You can find many other useful info there. ;-)

      Oh, as @cyperghost said, we usually use this thread to talk about shell scripting.

      By the way, you asked above and I'm not sure if you got an answer: the /dev/shm/runcommand.log file is deleted after a shutdown/reboot.

    • S

      Segmentation faults with mupen64plus after update

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support segmentation nintendo 64 mupen64plus runcommand
      16
      2 Votes
      16 Posts
      7k Views
      A

      @jonnykesh At first I updated the standalone mupen64plus package from source but it didn't solve the problem so I updated the lr-mupen64plus package too.

      In reddit someone wrote that it should work from now on with an update from the binarys.
      I tried the mupen64plus update from binarys and now it works :D

    • W

      Starting script when user selects system or game ?

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand menu
      8
      0 Votes
      8 Posts
      2k Views
      S

      @weyland can't you give me any advice?

    • SwampyS

      Including "Enhanced Graphics" for PS1 emulation in runcommand?

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development runcommand ps1 enhanced graphics psx
      3
      0 Votes
      3 Posts
      1k Views
      SwampyS

      Thank you for the information.
      Now I am a bit wiser.

    • R

      Use A-Button for all menus, not "Button 0"

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development runcommand controller
      3
      0 Votes
      3 Posts
      624 Views
      R

      Yes, I just took a look at joy2key.py
      https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/runcommand/joy2key.py
      and it seems this was fixed already, it reads the user-mapping from Retroarch config! My system is just too old, 4.1, I will upgrade and test again.

    • HurricaneFanH

      Runcommand config location for arcade emulator choice

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand backup cfg
      3
      0 Votes
      3 Posts
      1k Views
      HurricaneFanH

      @chipsnblip Thank you, that is exactly what I'm looking for.

    • NamErehWonN

      Testers Needed:: Launch Art arg for runcommand.sh

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development launch images runcommand customisation pull request
      1
      1 Votes
      1 Posts
      690 Views
      No one has replied
    • A

      Cannot change back emulator choice per Rom (solved)

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand emulator
      26
      0 Votes
      26 Posts
      10k Views
      D

      Solution worked (remove the corrupted file) but since I have way too many mame games with different emulators set, this isn't really a file I wanted to "start over" on. Similar to what @jackyracer already said, just wanted to remind and confirm that in my case I copied the bad file to my computer, still opened (thank goodness), copied and pasted the cfg text from the old file to a newly made emulators.cfg file, and moved the new file back over in the same place. All fixed, but most importantly, no damage done.

    • K

      [solved] Start Rom fails with Unable to open /dev/tty

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support retropie 4.2 nfc devtty emulationstaion runcommand
      13
      0 Votes
      13 Posts
      3k Views
      mituM

      @guest-001 The original poster had problems when starting runcommand.sh from /etc/rc.local, for which the solution was to change the /dev/tty to /dev/tty1.
      There is no reported problem when using runcommand.sh normally, from ES, so I was wondering if you had a similar script set-up - especially since you were talking about noticing an error when a SSH connection was made before ES starts.
      I don't know what might trigger your problems, but if you can reliably reproduce it from a RetroPie image, then share the steps necessary to get the error and we can try and see where the problem occurs.

    • NamErehWonN

      Question about launching game via command

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support command line script runcommand
      1
      0 Votes
      1 Posts
      566 Views
      No one has replied
    • hooperreH

      Runcommand Not Recognizing Joystick

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand ds4 dualshock 4
      8
      0 Votes
      8 Posts
      1k Views
      hooperreH

      @meleu That's okay! I've had a few issues specific to the DS4. I guess I'll just roll back to my last SD save.

    • W

      runcommand segmentation fault after update today

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand segfault
      11
      0 Votes
      11 Posts
      6k Views
      W

      You're welcome! ;)

      Thank you for helping us and your work on that joystick-selection tool. :)

    • herb_fargusH

      Take and Scrape Your Own Videos

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development videos scraper runcommand emulationstatio
      29
      7 Votes
      29 Posts
      8k Views
      C

      @herb_fargus I found that relying on sleep to properly time a 30 second video was getting mixed results so I modified your script a little to crop the video afterward for a more uniform recording length.

      It requires that you install ffmpeg beforehand though.

      #!/usr/bin/env bash system="$1" emulator="$2" rompath="$3" launch="$4" rom_file="${rompath##*/}" rom="${rom_file%.*}" mediadir="$HOME/RetroPie/roms/$system/images" tmpfile="/tmp/$rom-video.mkv" videofile="$mediadir/$rom-video.mkv" # Create videos folder in system's rom folder if [[ ! -d "$mediadir" ]]; then mkdir -p "$mediadir" dialog --msgbox "$mediadir created!" 20 60 >/dev/tty fi # Launch to record gameplay on RetroArch Systems. if [[ "$launch" =~ retroarch ]]; then eval "$launch" "--record \"$tmpfile\"" & sleep 120 killall retroarch # Crop video to 30 seconds eval "ffmpeg -y -t 30" "-i \"$tmpfile\"" "-acodec copy \"$videofile\"" & exit 1 else dialog --msgbox "Video recording is not supported for this system" 20 60 >/dev/tty fi
    • C

      Runcommand not showing before rom load.

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand
      1
      0 Votes
      1 Posts
      520 Views
      No one has replied
    • SonPluckS

      Runcommand knows I pressed a button, still doesn't run.

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand splashscreen help cmdline.txt asplashscreen
      4
      0 Votes
      4 Posts
      1k Views
      EfriimE

      This is an old issue but, I have something to add. The button response, is only accepted right after the dialog/launching.png disappears. There is it seems, either a huge delay, or joy2key won't trigger until the end of the script. I'm guessing this could be fixed, its worth fixing. Additional features should be added to run command as well, though I can't think of any good ones right now.

    • SonPluckS

      Where and how do I look for runcommand.log? so I can look for errors

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand icons folder path file locations noob
      2
      0 Votes
      2 Posts
      2k Views
      meleuM

      @SonPluck /dev/shm/runcommand.log

      It won't work if you remove the SD to plug in another computer because files under /dev/shm are RAM based, which means that they only exist while the raspi is on.

    • coderkevinC

      Announcing: Screen Management Script

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development autostart autostart rom runcommand daemon
      6
      1 Votes
      6 Posts
      2k Views
      coderkevinC

      Glad it can be helpful for others!

    • coderkevinC

      How to run games programmatically?

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support runcommand scripting programming command line daemon
      4
      0 Votes
      4 Posts
      2k Views
      coderkevinC

      Okay folks, I've written up a script to handle this exactly the way I described before.

      It runs from the autostart.sh and watches /dev/shm/screen_manager.cfg for updates.
      That way any other system process can create/modify that file and this script will respond by either starting the rom, or starting the dashboard.

      Cheers!

      https://github.com/coderkevin/mini-nes/tree/master/screen

    • meleuM

      Looking for testers: custom joystick mappings for runcommand/retropie_setup menus

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development joy2key runcommand retropie-setup
      26
      3 Votes
      26 Posts
      8k Views
      meleuM

      I think it's worth to mention it was implemented. Those who like to update frequently may have noticed. The PR 1980 was merged, and now the "a button" means "A button".

      Thanks to all the testers here!