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

    [Solved]Getting Moonlight to run without..

    Scheduled Pinned Locked Moved Help and Support
    27 Posts 3 Posters 18.4k 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.
    • mediamogulM
      mediamogul Global Moderator @Exmix
      last edited by mediamogul

      @Exmix

      The ports menu accepts and displays shell scripts, so you should be able to simply create one with the command you're already using and then give it a file name, like 'Moonlight', that will look nice in the menu. I don't think you'd need to do anything further.

      Edit: To expand on that for you or perhaps others who come along in the future, that would involve dropping to the command line from Emulation Station by pressing the 'F4' key and typing:

      nano /home/pi/RetroPie/roms/ports/Moonlight.sh
      

      From here you would type the following at the very top:

      #!/bin/bash
      

      Next, type in the command that is normally used to launch moonlight in a separate line below. When finished, press 'ctrl+o' to save, 'enter' to confirm and 'ctrl+x' to exit. To then make the script executable, you would type:

      chmod +x /home/pi/RetroPie/roms/ports/Moonlight.sh
      

      Lastly, you would type:

      emulationstation
      

      Press 'enter' and wait for Emulation Station to load, where you should now be able to see and launch the script from the 'Ports' menu.

      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

      ExmixE 1 Reply Last reply Reply Quote 1
      • ExmixE
        Exmix @mediamogul
        last edited by

        @mediamogul
        I tried this but may have messed it up. As of right now i have Kodi in there, no issued. I take the shell script and see this:
        #!/bin/bash
        "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 PORT kodi

        So I thought i'd do the same thing and try this:
        #!/bin/bash
        "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 PORT moonlight stream [My IP address]

        But it comes up saying permission denied.
        So, if there's anything i'm missing please let me know or let me know what i'm doing wrong. :X

        mediamogulM 1 Reply Last reply Reply Quote 0
        • mediamogulM
          mediamogul Global Moderator @Exmix
          last edited by mediamogul

          @Exmix

          I thought my comment was possibly too vague. I was editing the post while you were responding. Let me know how it works now.

          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

          ExmixE 1 Reply Last reply Reply Quote 0
          • ExmixE
            Exmix @mediamogul
            last edited by

            @mediamogul
            I changed my SH file to match what you put above, followed the rest. only problem now is, when I run Moonlight, I get the error saying it's not found.

            mediamogulM 1 Reply Last reply Reply Quote 0
            • mediamogulM
              mediamogul Global Moderator @Exmix
              last edited by mediamogul

              @Exmix

              Paste what you have in the Moonlight.sh you made. There could be a subtle syntax error somewhere. Also, knowing the exact error phrasing might help as well.

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              ExmixE 1 Reply Last reply Reply Quote 0
              • ExmixE
                Exmix @mediamogul
                last edited by

                @mediamogul
                What I have in my Moonlight.sh is:
                #!/bin/bash
                moonlight stream [My IP address]

                The exact error is:
                sh: 1: /home/pi/RetroPie/roms/ports/Moonlight.sh: not found

                mediamogulM 1 Reply Last reply Reply Quote 0
                • mediamogulM
                  mediamogul Global Moderator @Exmix
                  last edited by mediamogul

                  @Exmix

                  Try adding the full directory path to the moonlight executable in your script.

                  .../.../.../moonlight stream [My IP address] rather than moonlight stream [My IP address], of course with the actual directory names replacing the ... examples.

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  ExmixE 1 Reply Last reply Reply Quote 0
                  • ExmixE
                    Exmix @mediamogul
                    last edited by

                    @mediamogul
                    Tried. New code:
                    #!/bin/bash
                    /home/pi/RetroPie/roms/ports/moonlight stream [My IP Address]

                    Still says it's not found, with the same error.
                    It's weird. like I said I can get it to run when I use the "File Manager' from the RetroPie menu. When in there I just use:
                    moonlight stream [My IP Address] and it boots up no problem.

                    mediamogulM 1 Reply Last reply Reply Quote 0
                    • mediamogulM
                      mediamogul Global Moderator @Exmix
                      last edited by mediamogul

                      @Exmix

                      Based on what you wrote there, something tells me your path is not correct. The path you have above leads to the ports directory where the shell script was created. Is that really where the Moonlight executable resides? Remember, the shell script we created is different than the actual Moonlight executable. The path needs to point to the latter.

                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                      ExmixE 1 Reply Last reply Reply Quote 0
                      • ExmixE
                        Exmix @mediamogul
                        last edited by Exmix

                        @mediamogul
                        I THINK it's under /usr/bin
                        Lemme try that.

                        Edit:
                        Nope. I tried to change the path to:
                        /usr/bin/moonlight stream [My IP Address]
                        That is my Moonlight.sh

                        It's still telling me:
                        sh: 1: /home/pi/RetroPie/roms/ports/Moonlight.sh: not found

                        mediamogulM 2 Replies Last reply Reply Quote 0
                        • mediamogulM
                          mediamogul Global Moderator @Exmix
                          last edited by

                          @Exmix

                          Just for clarity, I have to ask if the /usr/bin/ location was a guess or did actually check to see if it was there first?

                          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                          ExmixE 1 Reply Last reply Reply Quote 0
                          • ExmixE
                            Exmix @mediamogul
                            last edited by Exmix

                            @mediamogul
                            xD I checked. I'm still looking through my other folders, but thats where I see moonlight.
                            If you have any form of IM to make this quicker i'm ok with that. Just let me know what you have.

                            Edit:
                            Just tried running that moonlight from the /usr/bin folder and that is the right path

                            1 Reply Last reply Reply Quote 0
                            • mediamogulM
                              mediamogul Global Moderator @Exmix
                              last edited by mediamogul

                              @Exmix

                              Based on the ability to run the command as you originally listed from the file manager without doing anything more, you might want to try:

                              Edit: Well, I have to admit, I'm at a bit of a loss. I'm probably missing something because it's late. I'll continue to think on it, but in the mean time, if anyone else out there can see what the barrier might be, feel free to chime in.

                              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                              ExmixE 1 Reply Last reply Reply Quote 0
                              • ExmixE
                                Exmix @mediamogul
                                last edited by Exmix

                                @mediamogul
                                Right. I didn't think of using the origional path but I don't know what's going on either. Figured a simple script should fix this.
                                All good. If you think of anything, i'll check this as often as I can to see if anythign works.
                                I just cant figure out why it says it's not found.

                                mediamogulM 1 Reply Last reply Reply Quote 0
                                • mediamogulM
                                  mediamogul Global Moderator @Exmix
                                  last edited by

                                  @Exmix

                                  After some more thought, I still don't have much as to why this isn't working. The error you're getting reports that the problem is with line 1 of the script, so my only advice is to examine it closely for any potential issues.

                                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                  ExmixE 1 Reply Last reply Reply Quote 0
                                  • ExmixE
                                    Exmix @mediamogul
                                    last edited by Exmix

                                    @mediamogul
                                    I have been. No idea what's going on. I guess i'll just have to type it in through the File Manager if I wanna use it.
                                    Thanks for all your help though. I appreciate it.

                                    mediamogulM 1 Reply Last reply Reply Quote 0
                                    • mediamogulM
                                      mediamogul Global Moderator @Exmix
                                      last edited by mediamogul

                                      @Exmix

                                      Is it at all possible that the script has even temporarily been on a Windows/Mac drive or been through Windows/Mac software?

                                      RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                      ExmixE 1 Reply Last reply Reply Quote 1
                                      • ExmixE
                                        Exmix @mediamogul
                                        last edited by Exmix

                                        @mediamogul
                                        Yeah. I have it saved on the RetroPie, but I opened and edited it through Samba and use Notepad++, save it, then reload emulationstation.
                                        Only reason I did that is because for some reason when I try to type a poun sign(#) on the command line on the Pi, I get the symbol for a Euro. xD or well it looks like a Euro symbol.
                                        I can always SSH into it and do it that was it that would work since it's still creating it on the Pi itself.

                                        herb_fargusH mediamogulM 2 Replies Last reply Reply Quote 0
                                        • herb_fargusH
                                          herb_fargus administrators @Exmix
                                          last edited by

                                          @Exmix

                                          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                                          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                                          ExmixE 1 Reply Last reply Reply Quote 1
                                          • mediamogulM
                                            mediamogul Global Moderator @Exmix
                                            last edited by mediamogul

                                            You crazy Brits with your kooky keyboards and Spotted Dick. Actually, you'll have to forgive me. The only knowledge I have of the region comes from 'King Ralph'.

                                            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                                            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.