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:
[image: 1466018552300-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.
[image: 1466023069138-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
[image: 1466023076168-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.
[image: 1466023468773-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:
[image: 1466023738076-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:
[image: 1466025039764-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:
[image: 1466024116824-mm-capture.png]
Congratulations!