RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Command line command works but doesn't work if I put it into a script?

    Scheduled Pinned Locked Moved Help and Support
    autostart rombootnes
    6 Posts 4 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kick53rv3
      last edited by

      I am trying to get my retropie to auto load a rom on start without going into emulation station.

      I tested the following command in command line and it launches the game successfully:

      /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes /home/pi/Retropie/roms/nes/mario.nes

      but when I put it into /opt/retropie/configs/all/autostart.sh (only the above line, nothing else in the file), on boot up it tries to load the game then falls back into command line.

      I also tried to put the line above in a .sh script, gave +x permission, it would show the loading game screen (like the startup) but falls back directly to command line.

      Do I need to do something different to put the command into a script?

      Thanks!

      markyh444M 1 Reply Last reply Reply Quote 0
      • markyh444M
        markyh444 @kick53rv3
        last edited by markyh444

        @kick53rv3 is the Retropie part of the ROM path not meant to be RetroPie? Looks like it from the Wiki on transferring ROMs

        Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
        Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
        Retropie in a PSX - Pi3
        https://markyh444.wordpress.com

        1 Reply Last reply Reply Quote 2
        • BuZzB
          BuZz administrators
          last edited by

          You already have another topic open too.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • K
            kick53rv3
            last edited by

            @BuZz sorry I was not the OP in the other thread

            @markyh444 ill double check it but the same command works in command line but when I put it into a script and run the script it doesn't work

            meleuM 1 Reply Last reply Reply Quote 0
            • meleuM
              meleu @kick53rv3
              last edited by

              @kick53rv3 as @markyh444 said, Linux is case sensitive, so it won't find /home/pi/Retropie/roms/nes/mario.nes (as you typed on the first post).

              If it isn't the problem, to let us help you, you should post the exact error message you got when it "tries to load the game then falls back into command line".

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              1 Reply Last reply Reply Quote 0
              • BuZzB
                BuZz administrators
                last edited by

                Sorry. My mistake. This is why it's confusing when people add to other posts. I believe it's the case issue as @meleu has said.

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                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.