Skip to content

Jessie Lite Installation Guide

PCP edited this page Aug 17, 2016 · 2 revisions

MagicMirror 2 install on a clean Rasbian Jessie Lite installation

First Update your Linux:

sudo apt-get update

sudo apt-get upgrade

Install LXDE-gui and lightdm:

sudo apt-get install lxde-core

sudo apt-get install lightdm

Let the LXDE-gui autostart:

sudo raspi-config

go to "Boot Options" and change boot to "Desktop" or "Desktop Autologin"

Install git to get the MagicMirror code:

sudo apt-get install git

Install the missing packages:

sudo apt-get install libxss1

sudo apt-get install libnss3

Autohiding the Mouse Cursor with unclutter:

sudo apt-get install unclutter

Get and install MagicMirror with the Automatic Installer:

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

Go to MagicMirror folder:

cd ~/MagicMirror

Install the app:

npm install

Duplicate config/config.js.sample to config/config.js.

cp /config/config.js.sample /config/config.js

Go back to root:

cd ..

Rotating the screen and hide Rainbow colored cube:

sudo nano /boot/config.txt

Add the following line:

display_rotate=3

avoid_warnings=1

Auto Starting MagicMirror:

Install PM2 using NPM:

sudo npm install -g pm2

Starting PM2 on Boot:

pm2 startup

PM2 will now show you a command you need to execute.

The code is:

sudo su -c "env PATH=$PATH:/usw/bin pm2 startup linux -u pi --hp /home/pi"

Make a MagicMirror start script:

go back to root:

cd ~

Create the start script:

nano mm.sh

Add the following lines:

cd ~/MagicMirror DISPLAY=:0 npm start

Save and close, using the commands CTRL-O and CTRL-X.

Make the shell script executable:

chmod +x mm.sh

You are now ready to the MagicMirror using this script using PM2.

Starting your MagicMirror with PM2

pm2 start mm.sh

Enable restarting of the MagicMirror script:

pm2 save

Disable the screensaver:

Go to LXDE-autostart config:

sudo nano /etc/xdg/lxsession/LXDE/autostart

add the following lines:

@xset s noblank @xset s off @xset -dpms

Save and close, using the commands CTRL-O and CTRL-X.

Go to lightdm.conf:

sudo nano /etc/lightdm/lightdm.conf

add the following lines:

xserver-command=X -s 0 -dpms

Reboot the raspberry pi:

sudo reboot

Finish and see the magic!