MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. rmd6502
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    rmd6502

    @rmd6502

    1
    Reputation
    451
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    rmd6502 Unfollow Follow

    Best posts made by rmd6502

    • RE: MagicMirror on Pi Zero W

      Nice and thorough tutorial!
      I followed most of it, but got off the train at Midori since I already had chromium-browser installed on my pi.
      What I did instead was modify package.json to add a serveronly script thusly:

        "scripts": {
          "start": "electron js/electron.js",
          "serveronly": "node serveronly"
        },
      

      then modified serveronly/index.js to kick off chrome thusly:

      const spawn = require('child_process').spawn
      ...
      console.log("Ready to go! Please point your browser to: http://" + bindAddress + ":" + config.port);
              process.env.DISPLAY=':0.0'
              var browser = spawn('chromium-browser',['http://localhost:8080', '--kiosk', '--incognito'])
      

      Without --incognito I would get an annoying popup from Chrome telling me it didn’t shut down cleanly, and would I like to restore my window configuration.
      I then added

      su - pi -c "cd /home/pi/Documents/MagicMirror && PATH=/usr/local/bin:${PATH} && /usr/local/bin/npm run serveronly" &
      

      to /etc/rc.local (how’s that for lazy?)
      Anyway, HTH

      posted in Tutorials
      R
      rmd6502

    Latest posts made by rmd6502

    • RE: MagicMirror on Pi Zero W

      Nice and thorough tutorial!
      I followed most of it, but got off the train at Midori since I already had chromium-browser installed on my pi.
      What I did instead was modify package.json to add a serveronly script thusly:

        "scripts": {
          "start": "electron js/electron.js",
          "serveronly": "node serveronly"
        },
      

      then modified serveronly/index.js to kick off chrome thusly:

      const spawn = require('child_process').spawn
      ...
      console.log("Ready to go! Please point your browser to: http://" + bindAddress + ":" + config.port);
              process.env.DISPLAY=':0.0'
              var browser = spawn('chromium-browser',['http://localhost:8080', '--kiosk', '--incognito'])
      

      Without --incognito I would get an annoying popup from Chrome telling me it didn’t shut down cleanly, and would I like to restore my window configuration.
      I then added

      su - pi -c "cd /home/pi/Documents/MagicMirror && PATH=/usr/local/bin:${PATH} && /usr/local/bin/npm run serveronly" &
      

      to /etc/rc.local (how’s that for lazy?)
      Anyway, HTH

      posted in Tutorials
      R
      rmd6502