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

    RetroPie and MagicMirror

    Scheduled Pinned Locked Moved Help and Support
    magicmirrorports retropieports
    14 Posts 3 Posters 2.6k 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.
    • R
      Ramez
      last edited by

      greetings..
      I'm trying to make a port for an installed app called MagicMirror, had made a .sh file in retropie/roms/ports called MagicMirror.sh containing
      #!/bin/bash then the command required to run the app
      cd /home/pi/MagicMirror && npm start
      then typed in terminal
      chmod +x /home/pi/RetroPie/roms/ports/MagicMirror.sh
      nothing happend (should anything happen after i type it?)
      and made another MagicMirror.cfg file in /opt/retropie/configs/ports/MagicMirror
      contain
      MagicMirror = "npm start"
      default = "MagicMirror"

      run it...it runs but gives an error...here is the npm log file

      1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
      2 info using npm@5.6.0
      3 info using node@v9.11.2
      4 verbose run-script [ 'prestart', 'start', 'poststart' ]
      5 info lifecycle magicmirror@2.4.1~prestart: magicmirror@2.4.1
      6 info lifecycle magicmirror@2.4.1~start: magicmirror@2.4.1
      7 verbose lifecycle magicmirror@2.4.1~start: unsafe-perm in lifecycle true
      8 verbose lifecycle magicmirror@2.4.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
      9 verbose lifecycle magicmirror@2.4.1~start: CWD: /home/pi/MagicMirror
      10 silly lifecycle magicmirror@2.4.1~start: Args: [ '-c', 'sh run-start.sh' ]
      11 silly lifecycle magicmirror@2.4.1~start: Returned: code: 1  signal: null
      12 info lifecycle magicmirror@2.4.1~start: Failed to exec start script
      13 verbose stack Error: magicmirror@2.4.1 start: `sh run-start.sh`
      13 verbose stack Exit status 1
      13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
      13 verbose stack     at EventEmitter.emit (events.js:180:13)
      13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      13 verbose stack     at ChildProcess.emit (events.js:180:13)
      13 verbose stack     at maybeClose (internal/child_process.js:936:16)
      13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
      14 verbose pkgid magicmirror@2.4.1
      15 verbose cwd /home/pi/MagicMirror
      16 verbose Linux 4.14.62-v7+
      17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
      18 verbose node v9.11.2
      19 verbose npm  v5.6.0
      20 error code ELIFECYCLE
      21 error errno 1
      22 error magicmirror@2.4.1 start: `sh run-start.sh`
      22 error Exit status 1
      23 error Failed at the magicmirror@2.4.1 start script.
      23 error This is probably not a problem with npm. There is likely additional logging output above.
      24 verbose exit [ 1, true ]
      

      any help please I'm a newpie in such things
      thanks in advance...

      cyperghostC 1 Reply Last reply Reply Quote 0
      • cyperghostC
        cyperghost @Ramez
        last edited by

        @ramez You likely need the full version of Raspbian not the lite one RetroPie is build.

        R 1 Reply Last reply Reply Quote 0
        • R
          Ramez @cyperghost
          last edited by

          @cyperghost tried but still got the exact error...just a small question do we have any tutorial on how to create apps in ports (instead of wiki page cause it doesn't really help with procedure)?

          mituM cyperghostC 2 Replies Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @Ramez
            last edited by

            @ramez There's no tutorial to 'create' Ports. You take existing working games/programs and you create an installation procedure for them. You can take a look at an existing port in the RetroPie's Github repository.
            Is your application working standalone without problems on the RetroPie system ?

            1 Reply Last reply Reply Quote 1
            • cyperghostC
              cyperghost @Ramez
              last edited by

              @ramez No we do not have such a section. And it is not needed because as @mitu said the ports are just bash files that call a specific program. So if the mirror does not work standalone then it will not work as port script out of EmulationStation.

              Read the mirror tut in github. This seems very detailed and ask the people there for further assistance. Maybe the error message is common.

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator
                last edited by mitu

                I think the problem is that MagicMirror seems to require the X.org environment to run.
                @Ramez Install the PIXEL desktop from the RetroPie setup script - https://retropie.org.uk/docs/FAQ/#where-did-the-desktop-go - , then start it from ES and try to run MagicMirror from the Desktop environment.

                cyperghostC 1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost @mitu
                  last edited by

                  @mitu this makes no sense. I asked @Ramez if he used the full Rasbian version and he said it is the same error. So it seems not to rely on X or he misunderstood what I wanted to express

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @cyperghost
                    last edited by

                    @cyperghost said in RetroPie and MagicMirror:

                    I asked @Ramez if he used the full Rasbian version and he said it is the same error.

                    May be the same error, but their Wiki suggests an X env is needed, since it's an Electron app - https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi.

                    cyperghostC 1 Reply Last reply Reply Quote 1
                    • cyperghostC
                      cyperghost @mitu
                      last edited by

                      @mitu oh that will end in a mess ... OpenGL driver support should be disabled.

                      But in fact a cool project... Use a half (?!!) mirror in front of a display and get your weather report and if you are funny play Mario.

                      1 Reply Last reply Reply Quote 0
                      • R
                        Ramez
                        last edited by

                        thanks for great discussion guys :) @mitu yes Mirror working correctly when i run it from terminal or PIXEL in both retropie img (lite Rasbian) or full one.
                        @cyperghost that's exactly what I aim to do, Having a stunning mirror in my home and guess what!! it plays PlayStation and Retro nostalgia games (^_^) ... but still can't figure out how to add mirror directly to the RetroPie ports :( actually I've ended up creating a desktop shortcut for the mirror so I log into ES to play games or log into desktop to (log into) mirror until someone help me fixing that problem.

                        cyperghostC 1 Reply Last reply Reply Quote 0
                        • cyperghostC
                          cyperghost @Ramez
                          last edited by

                          @ramez okay then it us very easy to do

                          Create a shortcut to autostart mirror within Pixel. Then in Ports section create a call to launch Pixel then it will work as you like.

                          To terminate Pixel you can use controller config that calls my Multi Switch Shutdown Script like ./multi_switch.sh --es-closeemu. This will kick you back to ES

                          R 1 Reply Last reply Reply Quote 1
                          • R
                            Ramez @cyperghost
                            last edited by

                            @cyperghost many thanks will try it :)

                            1 Reply Last reply Reply Quote 0
                            • R
                              Ramez
                              last edited by Ramez

                              EDIT: @cyperghost I can see that your MSS script requires a hardware GPIO button, am I right?
                              Just wanted solution to quit PIXEL globally, I've done that by simply editing lxde shortcuts and adding a new keybind that ends user session like that :
                              type sudo nano /home/pi/.config/openbox/lxde-pi-rc.xml
                              add the following code under keyboard bindings <!-- Keybindings for running applications -->

                              <keybind key="C-e">
                                    <action name="Execute">
                                         <command>pkill -KILL -u pi</command>
                                    </action>
                                  </keybind>
                              

                              So as Ctrl+q quit apps ,Now Ctrl+e quits the whole desktop :)
                              Reference1 .... Reference2

                              I've also made it possible to exit the system (my mirror in that case) by joystick just like RetroArch emulators hotkey [start+select] by remapping the keyboard and made aTutorial for that ;)

                              cyperghostC 1 Reply Last reply Reply Quote 1
                              • cyperghostC
                                cyperghost @Ramez
                                last edited by

                                @ramez said in RetroPie and MagicMirror:

                                EDIT: @cyperghost I can see that your MSS script requires a hardware GPIO button, am I right?

                                No it can be tight to a button but it can also just be called by script itself. Read more about on its help screen.
                                The option --es-closeemu brings you back to ES as long as you used to start Pixel officially installed by RetroPie
                                The option --es-poweroff performs a safe shutdown with metadata saved. So you can tie several parameters to joypad described in your how to.

                                But it is fundamental that any program must he launched through EmulationStation by runcommand call. The script uses runcommand as starting entry to determine all PIDs that will be closed by script call

                                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.