MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    Scheduled Pinned Locked Moved Tutorials
    raspberry pipi0zeropizeropi1
    204 Posts 47 Posters 554.7k Views 47 Watching
    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.
    • L Offline
      longod
      last edited by

      Hi! I have followed this guide step by step and so precisely, however I am still getting an error when I type in DISPLAY=:0 npm start through SSH. This is the output:

      pi@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
      
      > magicmirror@2.1.1 start /home/pi/MagicMirror
      > sh run-start.sh
      
      /home/pi/MagicMirror/node_modules/electron/dist/electron: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
      
      npm ERR! Linux 4.4.50+
      npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
      npm ERR! node v4.2.1
      npm ERR! npm  v2.14.7
      npm ERR! file sh
      npm ERR! code ELIFECYCLE
      npm ERR! errno ENOENT
      npm ERR! syscall spawn
      npm ERR! magicmirror@2.1.1 start: `sh run-start.sh`
      npm ERR! spawn ENOENT
      npm ERR!
      npm ERR! Failed at the magicmirror@2.1.1 start script 'sh run-start.sh'.
      npm ERR! This is most likely a problem with the magicmirror package,
      npm ERR! not with npm itself.
      npm ERR! Tell the author that this fails on your system:
      npm ERR!     sh run-start.sh
      npm ERR! You can get their info via:
      npm ERR!     npm owner ls magicmirror
      npm ERR! There is likely additional logging output above.
      
      npm ERR! Please include the following file with any support request:
      npm ERR!     /home/pi/MagicMirror/npm-debug.log
      

      Any help on what to do to solve this would be greatly appreciated!

      H 1 Reply Last reply Reply Quote 0
      • H Offline
        Hawking @longod
        last edited by

        @longod

        I didn’t try your way of starting the MagicMirror. However, is there a reason that you don’t use the commands in the guide to start the MagicMirror (using the start.sh and startMidori scripts)? There is no DISPLAY=:0 npm start mentioned in this thread.

        1 Reply Last reply Reply Quote 0
        • R Offline
          RV @randombullet
          last edited by

          @randombullet i followed those steps but i got a error it says that he cannot connect with localhost: 8080 webpage?

          1 Reply Last reply Reply Quote 0
          • D Offline
            dantodd
            last edited by

            have you tried just using “npm start” in ssh? That works for me.

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              RV @dantodd
              last edited by

              @dantodd you mean every time i start my rasp on i need to type npm start?

              D B 2 Replies Last reply Reply Quote 0
              • H Offline
                Hawking
                last edited by Hawking

                @RV said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

                @dantodd you mean every time i start my rasp on i need to type npm start?

                no, that is definitely not necessary.

                I don’t know the reason for the error message (is there actually a space between localhost: and 8080?). What happens if you run

                cd ~/MagicMirror
                node serveronly &
                

                manually?

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dantodd @RV
                  last edited by

                  @RV said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

                  @dantodd you mean every time i start my rasp on i need to type npm start?

                  Automating the process is fairly simple but let’s get you up and running first. You should also check your permissions in the config.js file. Make sure that your whitelist is properly configured.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    braik @RV
                    last edited by braik

                    @RV Hi, I don’t know if it can help, but I have noticed that the “~” shortcut to go tho the /home/pi folder does not work on the scripts.
                    So when you do the same commands manually everything seems to be OK, but when you run the scripts then you get a bug.
                    The solution, in my case, was to replace all the folder shortcuts (as ~ for home folder) with the complete explicit path inside the scripts.
                    Good luck
                    Braik

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      RV @braik
                      last edited by

                      @braik as i said before i am not that experienced with Python, Linux or what so ever. I think you are right on this one. When i typed cd /home/pi/ i didn’t get a response or anything.

                      I hope you can show me how to replace the folder, like you have told me before.

                      H 1 Reply Last reply Reply Quote 0
                      • H Offline
                        Hawking @RV
                        last edited by

                        @RV said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

                        When i typed cd /home/pi/ i didn’t get a response or anything.

                        This sounds strange. Did you type it in the unit terminal? cd is the comand to change directory. Maybe you have already been in the /home/pi/ directory (than the change would have no effect). Could you type pwd (print working directory)
                        and give the result before and after the cd /home/pi/ command and give the results?

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 7
                        • 8
                        • 9
                        • 10
                        • 11
                        • 20
                        • 21
                        • 9 / 21
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy