User Tools

Site Tools


raspberry_magic_mirror

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
raspberry_magic_mirror [2020/01/25 20:20] herwarthraspberry_magic_mirror [2024/04/19 12:38] (current) herwarth
Line 21: Line 21:
 tmpfs                 /var/run           tmpfs   defaults,noatime,nosuid,mode=0755,size=2m   0 0 tmpfs                 /var/run           tmpfs   defaults,noatime,nosuid,mode=0755,size=2m   0 0
 tmpfs                 /etc/console-setup tmpfs   defaults,noatime,nosuid,mode=0755,size=2m   0 0 tmpfs                 /etc/console-setup tmpfs   defaults,noatime,nosuid,mode=0755,size=2m   0 0
-tmpfs                 /var/lib/chrony    tmpfs   defaults,noatime,nosuid,mode=0755,size=2m   0 0+tmpfs                 /var/lib/systemd/timesync tmpfs defaults,noatime,nosuid,mode=0755,size=2m 0 0
 tmpfs                 /var/lib/lightdm  tmpfs   defaults,noatime,nosuid,size=30m             0 0 tmpfs                 /var/lib/lightdm  tmpfs   defaults,noatime,nosuid,size=30m             0 0
 </code> </code>
Line 62: Line 62:
 xset s noblank xset s noblank
 unclutter -idle 0 & unclutter -idle 0 &
-cd ~/MagicMirror 
 xrandr --output HDMI-1 --rotate left & xrandr --output HDMI-1 --rotate left &
-npm start & 
 </code> </code>
 Rotate the graphical interface does not seem to work on a Pi 4. As you can see we are using xrandr to rotate. Rotation of the console must be disabled and the GL driver must be enabled. Rotate the graphical interface does not seem to work on a Pi 4. As you can see we are using xrandr to rotate. Rotation of the console must be disabled and the GL driver must be enabled.
Line 90: Line 88:
 console=serial0,115200 console=tty3 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fastboot noswap ro logo.nologo quiet loglevel=3 vt.global_cursor_default=0 console=serial0,115200 console=tty3 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fastboot noswap ro logo.nologo quiet loglevel=3 vt.global_cursor_default=0
 </code> </code>
-===== Install Magic Mirror 2 =====+===== Install=====
 We are going to use the recommended manual way: We are going to use the recommended manual way:
 ====Install packages==== ====Install packages====
Line 100: Line 98:
 sudo apt-get -y install git nodejs libnss3 libxtst-dev libxss-dev sudo apt-get -y install git nodejs libnss3 libxtst-dev libxss-dev
 </code> </code>
-Install Magic Mirror using git+==== Install Magic Mirror ====
 <code> <code>
 cd ~ cd ~
Line 113: Line 111:
 cd ~/MagicMirror/config cd ~/MagicMirror/config
 cp config.js.sample config.js cp config.js.sample config.js
 +</code>
 +==== Autostart Magic Mirror on boot ====
 +Install PM2 process manager
 +<code>
 +sudo npm install -g pm2
 +pm2 startup
 +</code>
 +The startup command creates a commandline we need to execute to create a systemd service. Execute it. In our case:
 +<code>
 +sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
 +</code>
 +Create a little script in homedir of pi with name mm.sh
 +<code - /home/pi/mm.sh>
 +cd ~/MagicMirror
 +DISPLAY=:0 npm start
 +</code>
 +<code>
 +chmod +x mm.sh
 +</code>
 +<code>
 +bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
 </code> </code>
 Reboot and enjoy Reboot and enjoy
 +{{tag>linux}}
raspberry_magic_mirror.1579983633.txt.gz · Last modified: by herwarth