Read the statement by Michael Teeuw here.
Newbie having trouble with running MM on a Pi Zero
-
Heya everyone,
Now first of all, my experience with Linux/Python is very low, but generally I know my way around computers. I also understand that the Pi Zero isn’t the best way to run a Magic Mirror. However I promised my lovely girlfriend to give it a try, so here I am ;)
I started out with a fresh copy of Jessie on my Pi Zero, nothing special there. Then I went to the post by @evos which said the following:
Installation on Pi Zero
Install Node with dpkg (apt repo has old version)sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
Install npmsudo apt-get install npm
Install MagicMirrorcd /home/pi/
git clone https://github.com/MichMich/MagicMirror
sudo npm install
Install Kweb and uncluttersudo apt-get install kweb
sudo apt-get install unclutter (removes cursor)
Autostart at bootSetup autologin with raspi-config (http://elinux.org/RPi_raspi-config), mode: Console Autologin
Create script /home/pi/start.sh:
cd ~/MagicMirror
node serveronly &
sleep 30
xinit /usr/bin/kweb -KJE4 “http://localhost:8080”Edit /home/pi/.bashrc
Add /home/pi/start.sh at the bottom.At this point I ran into a few problems (Installing Node gave some troubles, giving errors about the ‘legacy version’ interfering with the version I tried to install and a few ‘warnings’ while installing MM2). However I think that part all went okay.
The things is that whenever I boot my Pi (connected to internet and a monitor) it just boots into the desktop, no mention of Kweb or any other browser or any popups at all. When I SSH into my Pi just after booting my SSH client gives the following messages:
Loading config …
WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method ‘accessSync’
Loading module helpers …
No helper found for module: helloworld.
All module helpers loaded.
Starting server op port 8080 …
Server started …
Sockets connected & modules started …Ready to go! Please point your browser to: http://localhost:8080
Whoops! There was an uncaught exception…
{ [Error: listen EADDRINUSE] code: ‘EADDRINUSE’, errno: ‘EADDRINUSE’, syscall: ‘listen’ }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issuesX: user not authorized to run the X server, aborting.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0”
after 7 requests (7 known processed) with 0 events remaining.
-bash: /home/pi/start.sh: Permission deniedI kinda get what the problem is: the errors about MM look like a configuration problem to me (haven’t been working on that yet) and the server doesn’t have permission to run. However, I’m really lost about how to fix this, any pointers would be great :D
Also thanks for being this awesome community you all are!
Wieber -
Off the top of my head: Did you copy the
config.js.sample
intoconfig.js
?IIRC, the “EADDRINUSE” error is usually when you have an instance running and try to run the mirror without shutting down the existing NPM process.
This:
bash: /home/pi/start.sh: Permission denied
makes me think you need to make yourstart.sh
script executable. Try this command:chmod a+x /home/pi/start.sh
and then reboot.