Read the statement by Michael Teeuw here.
Magic Mirror on the Raspberry Pi 1, agonizingly difficult
-
@bhepler Thanks, but since I’m really clueless I’m not quite sure what to do…
The contents of mm.sh
cd ~/MagicMirror
DISPLAY=:0 npm start
node serveronly
chromium-browser --noerrdialogs --disable-session-crashed-bubble -incognito --kiosk http://localhost:8080I’'ve also got the following at the end of the LXDE autostart file
@pm2 start mm.shBTW: when I run pm2 start mm.sh from the terminal the mirror starts up just fine, so I don’t know why it doesn’t autostart properly…
-
No problem. It’s confusing at first for just about everybody.
@MMRPi1 said in Magic Mirror on the Raspberry Pi 1, agonizingly difficult:
The contents of mm.sh
cd ~/MagicMirror
DISPLAY=:0 npm start
node serveronly
chromium-browser --noerrdialogs --disable-session-crashed-bubble -incognito --kiosk http://localhost:8080Your script is attempting to start the Magic Mirror twice.
DISPLAY=:0 npm start
will start the mirror via electron. That line would normally blank the Pi’s screen, start up the MM process and display the interface. You probably want to remove this line.
The linenode serveronly
starts up the MM process as well, but only to provide the interface to web browsers. And your final line opens the web browser.So. Try deleting the
DISPLAY=:0 npm start
line and then testing your script.cd ~ ./mm.sh
That should start the MM process and open up your web browser to the interface. Let us know how it goes!
I’'ve also got the following at the end of the LXDE autostart file
@pm2 start mm.shYeah, delete that line.
BTW: when I run pm2 start mm.sh from the terminal the mirror starts up just fine, so I don’t know why it doesn’t autostart properly…
Oh. Easy enough to fix. Do just what you said, run
pm2 start mm.sh
. Once the browser is up, switch to the terminal on the pi and tell PM2 to save the current state.pm2 save
. One you do that, PM2 should start with the pi and then start the MM process and your browser.Edited to add: Did you run the
pm2 startup
and then copy & paste the command it gave as per the instructions? -
It worked!!!
Turns out I didn’t run pm2 startup (feeling a bit stupid)
Thank you so much to everyone, I couldn’t have done it without you XD -
Hi again…
My mirror seems to be a bit sluggish… (I installed a third party stock ticker)
Apart from decreasing animation time is there any way to improve this?? -
for some reason im having the same problem and it wont load the browser from the shell script. not sure why