树莓派安装魔镜功能模块

来源:互联网 发布:数据库1对多关系 编辑:程序博客网 时间:2024/06/04 17:43

Yep, it’s definitely possible, but it’s not easy. I’ve got the server plus an auto-boot into chromium kiosk mode up and running on a Raspberry Pi 1.

Here’s some half-written notes that I was keeping as I went through the process. Hopefully somebody can take this and turn it into better documentation.

PC-side:
install WinSCP: https://winscp.net/eng/download.php
install PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Overall kiosk screen setup:
See https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/
Important commands:

sudo apt-get update && sudo apt-get upgrade -ysudo apt-get install chromium x11-xserver-utils unclutter

Install node.js:
See https://www.losant.com/blog/how-to-install-nodejs-on-raspberry-pi
Important commands:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bashnvm install v6.2.1

Magic Mirror setup:
See https://github.com/MichMich/MagicMirror#usage
Important commands:

sudo apt-get install php5curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh(need to modify raspberry.sh to take out the Pi1 fail check)bash raspberry.shgit clone https://github.com/MichMich/MagicMirrorcd ~/MagicMirrornpm installnode serveronly

Raspberry Pi 1 CSS incompatibility issue
fix drawing:
nano css/custom.css

height: 90%;width: 90%;

(TODO - find better fix for this)

Install wifi adapter:
See https://www.raspberrypi.org/forums/viewtopic.php?p=462982#p462982
Important commands:

lsusbuname -awget https://dl.dropboxusercontent.com/u/80256631/8188eu-20160305.tar.gztar xzf 8188eu-20160305.tar.gz./install.shsudo reboot

Create a startup script:

nano run_magicmirror.shecho 'removing log.txt'rm -f /home/pi/MagicMirror/log.txtecho 'running MagicMirror server'/home/pi/.nvm/versions/node/v6.2.1/bin/node /home/pi/MagicMirror/serveronly > /home/pi/MagicMirror/log.txtecho 'waiting for server to start'sleep 20echo 'running web browser'chromium --noerrdialogs --kiosk --incognito http://localhost:8080

Set up autostart:
See https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi
Important commands:
sudo nano /etc/xdg/lxsession/LXDE/autostart

@xscreensaver -no-splash@xset s off@xset -dpms@xset s noblank@lxterminal -e sh /home/pi/run_magicmirror.sh

Note from admin: Please use Markdown on code snippets!


转载地址:https://forum.magicmirror.builders/topic/272/raspberry-pi-1-any-magic-mirror-setup-possible/4

原创粉丝点击