Read the statement by Michael Teeuw here.
MagicMirror 2 only works with DISPLAY=:0 npm start command
-
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 commandDISPLAY=: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!
-
@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!
-
Or follow the extensive step by step tutorial here: https://forum.magicmirror.builders/topic/236/complete-setup-tutorial
-
@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
-
@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