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.

    MagicMirror 2 only works with DISPLAY=:0 npm start command

    Scheduled Pinned Locked Moved Troubleshooting
    5 Posts 3 Posters 6.4k Views 2 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.
    • M Offline
      mihirjain
      last edited by paviro

      Hello,
      I have installed raspbian jessie on my rpi2. I followed the howchoo.com website tutorial to do everything since I am a noob EXCEPT the part where magic mirror is to be installed. I followed the automatic method of Magicmirror’s github page.
      Then I put it in kiosk mode and did the last bits (more on that below) as per the howchoo site. End result? rpi boots and starts a web page with only the index visible. If I run the command DISPLAY=:0 npm start then it works.

      About the last bits after installing the MagicMirror in the automatic way: This is what I did:


      Turn Chromium into a kiosk

      Now we’ll configure Chromium to run in kiosk mode.

      Open the autostart config file in the Nano editor.

      Config file for Jessie:

      sudo nano ~/.config/lxsession/LXDE-pi/autostart

      Disable the screensaver
      For both Wheezy and Jessie, comment out the following line using a hash symbol (#):

      # @xscreensaver -no-splash

      Launch Chromium on startup in kiosk mode
      For Wheezy, add the following lines to the bottom of the file:

      @xset s off
      @xset -dpms
      @xset s noblank
      @unclutter -idle 1
      /usr/bin/chromium --kiosk --ignore-certificate-errors --disable-restore-session-state "http://localhost"
      

      For Jessie, add the following lines to the bottom of the file:

      @xset s off
      @xset -dpms
      @xset s noblank
      @unclutter -idle 1
      @chromium-browser --incognito --kiosk http://localhost/
      

      To exit, press CTRL-X, type Y and press enter.

      Next, we need to modify the Pi’s BIOS settings for a little extra awesomeness.

      Open BIOS config:

      sudo nano /boot/config.txt

      Use portrait monitor orientation
      Add the following line to rate the display 90 degrees:

      display_rotate=1

      To rotate in the other direction (270 degrees), use the following line instead:

      display_rotate=3

      Enable HDMI hotplugging
      Uncomment the following line:

      hdmi_force_hotplug=1

      Save and exit. Finally, reboot your Pi once more:

      sudo reboot


      Please help.

      thanks,
      Mir


      Note from admin: Please use Markdown on code and shell snippets!

      Wilco89W 1 Reply Last reply Reply Quote 0
      • Wilco89W Offline
        Wilco89 @mihirjain
        last edited by Wilco89

        @mihirjain that tut is outdated, beter install Version 2.
        It is beter to start with Clean install of Jessy.

        Walk through the readme and wiki!

        https://github.com/MichMich/MagicMirror

        M 1 Reply Last reply Reply Quote 0
        • KirAsh4K Offline
          KirAsh4 Moderator
          last edited by

          Or follow the extensive step by step tutorial here: https://forum.magicmirror.builders/topic/236/complete-setup-tutorial

          A Life? Cool! Where can I download one of those from?

          M 1 Reply Last reply Reply Quote 0
          • M Offline
            mihirjain @Wilco89
            last edited by

            @Wilco89 Thanks for the reply, though I didnt use the howchoo method for installation. I followed the github MagicMirror2 site method with the command

            curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

            1 Reply Last reply Reply Quote 0
            • M Offline
              mihirjain @KirAsh4
              last edited by

              @KirAsh4
              Thanks for the reply, I used the same command to install mm2 as per your detailed tutorial. Though some commands after installed mm2 were different so shall retry the whole thing.

              Thanks,
              Mihir

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • 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