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.

    Raspberry Pi Zero W for Magic Mirror

    Scheduled Pinned Locked Moved Hardware
    73 Posts 8 Posters 42.8k Views 9 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.
    • S Offline
      sdetweil @capedbuffethero
      last edited by

      @capedbuffethero the pi0 is older armv6l processor, it can only run 32 bit mode. the memory is small on pi0,

      everything that doesn’t fit in memory causes swapping, to the sd card. pi0 has the older slower sd chip.

      so, use the legacy 32 bit image to reduce the footprint

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • D Offline
        davidgagne @capedbuffethero
        last edited by

        @capedbuffethero Thanks! Please upvote if you found it valuable. I’m fairly new here and trying to improve my rep so all my posts aren’t held for moderation. :)

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          capedbuffethero @davidgagne
          last edited by

          @davidgagne It appears I need 1 reputation to upvote.

          S 2 Replies Last reply Reply Quote 1
          • S Offline
            sdetweil @capedbuffethero
            last edited by

            @capedbuffethero really? I’ll check on that. didn’t used to be.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 2
            • S Offline
              sdetweil @capedbuffethero
              last edited by sdetweil

              @capedbuffethero can you try this again… we should have reset this option to 0
              downvote still requires rep of 1 or above…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 1
              • plainbrokeP Offline
                plainbroke @davidgagne
                last edited by

                @davidgagne
                Does it matter that you install firefox-esr
                but in the mm.sh script you just call it firefox ?
                I went to midori to get mine to work it would not recognize the firefox in mm.sh for some reason.

                Slow learner. But trying anyways.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @plainbroke
                  last edited by sdetweil

                  @plainbroke the package is called firefox-esr

                  the program name is firefox
                  it must be on the path for mm.sh to execute it.
                  I don’t know if installing the package does that.
                  I don’t remember worrying about it

                  the command

                  which firefox
                  should return the full path to the executable if it’s on the path.
                  otherwise you can add its folder onto the path in the .profile or .bashrc scripts
                  that setup the shell environment

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    capedbuffethero @davidgagne
                    last edited by capedbuffethero

                    @davidgagne said in Raspberry Pi Zero W for Magic Mirror:

                    Summary

                    • when running DISPLAY=:0 npm start I got an unexpected error
                    • follow up question: export external_browser=firefox doesn’t this export vanish as soon as my session ends? Do I have to do this every time?
                    • firefox is started and is visible on VNC
                    • firefox is not able to connect to the node server (I guess the node server is not running)

                    Details:
                    When executing this script:

                    cd ~/MagicMirror
                    export external_browser=firefox
                    DISPLAY=:0 npm start
                    

                    on this step: I get this output:

                    myname@raspberrypi:~ $ cd ~/MagicMirror
                    myname@raspberrypi:~/MagicMirror $ export external_browser=firefox
                    myname@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
                    
                    > magicmirror@2.27.0 start
                    > ./run-start.sh $1
                    
                    ./run-start.sh: line 79:  8050 Killed                  node serveronly
                    
                    

                    these are the lines that precede line 79:

                        # if user explicitly configured to run server only (no ui local)
                        # OR there is no xwindows running, so no support for browser graphics
                        if [ "$serveronly." == "$true." ] || [ "$xorg." == "." -a $mac != 'Darwin' -a "$wait_for_x." != "." ]; then
                          # start server mode,
                          node serveronly
                        else
                          # start the server in the background
                          # wait for server to be ready
                          # need bash for this
                          exec 3< <(node serveronly)
                    

                    if we do export external_browser doesn’t that vanish as soon as the RPI is rebooted or if my session ends?

                    after a while the VNC client showed firefox start, but no URL, then the screen went white, then Firefox said “Unable to connect”

                    then I ran this script, I am tailing logs. What does “fix 'em up” script do

                  • Execute fix'em-up script:
                    bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
                    
                  • the last line is this: pm2 setup completed - Fri Jun 14 21:52:48 PDT 2024

                    cancelling the step DISPLAY=:0 npm start allows me to rerun this step, but the step always ends in failure.

                    UPDATE: “Unable to connect” is because Firefox cannot connect to the node server. VNC can connect without issue! The error is actually an error from the Firefox browser.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @capedbuffethero
                      last edited by sdetweil

                      @capedbuffethero
                      the export is used on the MagicMirror system side. it is paired with the
                      node server execution, which launches MagicMirror without a ui.
                      then when the server is running, run-start.sh launches a browser to connect to the server

                      the export has nothing to do with vnc,
                      it is just used to tell run-start.sh which browser to launch. (on linux, env variables are NOT passed to children processes by default. you have to use the export keyword to enable it, for each env var you want to pass)

                      if you set the MagicMirror config.js.js to

                      address:"0.0.0.0",
                      ipWhitelist:[],
                      

                      then you can use a browser on your phone, Windows, Linux, or Mac system to view MagicMirror directly without vnc

                      the killed message is because you restarted MagicMirror, and run-start.sh found the server instance running already. so it must be stopped and restarted in case you changed the config

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        funkdafied
                        last edited by

                        Hello all giving MM a try again on a Rpi zero and have been trying to run the script in this thread but keeping getting the following message

                        98df749c-1ae9-44bf-aea2-cd58f1c132c9-image.png

                        Am I missing something to by pass the Xorg check?

                        OS
                        achild@raspberrypi:~ $ cat /etc/os-release
                        PRETTY_NAME=“Raspbian GNU/Linux 12 (bookworm)”
                        NAME=“Raspbian GNU/Linux”
                        VERSION_ID=“12”
                        VERSION=“12 (bookworm)”
                        VERSION_CODENAME=bookworm
                        ID=raspbian
                        ID_LIKE=debian
                        HOME_URL=“http://www.raspbian.org/”
                        SUPPORT_URL=“http://www.raspbian.org/RaspbianForums”

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 8
                        • 6 / 8
                        • 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