Installing MagicMirror²
Thanks to @MichMich and his outstanding installation script, installing MagicMirror² is pretty straight forward.
Step 1
After you’ve configured and updated your Raspberry Pi and rebooted, launch a Terminal window again and type in
bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
This will start the installation process for you:
0_1466018397542_044-mm-install.sm.png
Step 2
A few configurations still need to be done on the Raspberry Pi, specific for MagicMirror². Let’s start with rotating the display vertically. For this, you’ll need to edit one of the boot configurations. (Please note: If you plan on running MagicMirror² as a landscape (or wide) display, you do not need to do this.)
Type in sudo nano /boot/config.txt and add the following to the file. Where you add it doesn’t really matter:
# Rotate display vertically
display_rotate=1
Press CTRL-X when you’re done, and say Y(es) to saving the changes.
0_1466022914081_047-configure-rpi.sm.png
Step 3
Let’s disable the screen saver and screen blanking as well. This needs to be done in two places. First in the autostart configuration:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
And add the following to the bottom of the file:
@xset s noblank
@xset s off
@xset -dpms
0_1466022921947_049-configure-rpi-sm.png
Next in the X-windows manager configuration:
sudo nano /etc/lightdm/lightdm.conf
Scroll down to the [SeatDefaults] section and look for the xserver-command line below that. Change the line to look like this:
xserver-command=X -s 0 -dpms (so you’re removing the # on the front, and adding the missing bits at the end.) Again, hit CTRL-X and say Y(es) to saving the file.
0_1466023313607_050-configure-rpi.sm.png
Step 4
A Raspberry Pi is configured to automatically shutdown parts of the hardware that aren’t actively in use. This includes the WiFi driver. This will cause MagicMiror² to occasionally fail to fetch updates for things like the newsfeed, weather, and others. You can disable the power saving feature for the WiFi from the interfaces configuration file:
sudo nano /etc/network/interfaces
Find the wlan0 section and add wireless-power off below it:
0_1466023583053_051-configure-rpi.sm.png
Once you’re done with that, reboot the rpi one more time with sudo reboot and when it comes back up again, open a Terminal window and type in iwconfig and you should see that the Power Management is now off:
0_1466024885350_052-iwconfig.sm.png
At this point you have completed the basic install for MagicMirror². The next step is to create a valid configuration file for it so you can test it out. You can do that by going into the MagicMirror’s config folder:
pi@magicpi:~ $ cd MagicMirror/config
pi@magicpi:~/MagicMirror/config $ cp config.js.sample config.js
You can now try to start MagicMirror².
pi@magicpi:~/MagicMirror/config $ cd $HOME/MagicMirror
pi@magicpi:~/MagicMirror $ npm start
If everything went well, your screen should load up the MagicMirror² interface. The weather module will tell you that you don’t have a valid APPID, but once set, your screen should look like this:
0_1466023961725_mm-capture.png
Congratulations!