@davidgagne said in Raspberry Pi Zero W for Magic Mirror:
Summary
- when running
DISPLAY=:0 npm start
I got an unexpected error
- follow up question:
export external_browser=firefox
doesn’t this export vanish as soon as my session ends? Do I have to do this every time?
- firefox is started and is visible on VNC
- firefox is not able to connect to the node server (I guess the node server is not running)
Details:
When executing this script:
cd ~/MagicMirror
export external_browser=firefox
DISPLAY=:0 npm start
on this step: I get this output:
myname@raspberrypi:~ $ cd ~/MagicMirror
myname@raspberrypi:~/MagicMirror $ export external_browser=firefox
myname@raspberrypi:~/MagicMirror $ DISPLAY=:0 npm start
> magicmirror@2.27.0 start
> ./run-start.sh $1
./run-start.sh: line 79: 8050 Killed node serveronly
these are the lines that precede line 79:
# if user explicitly configured to run server only (no ui local)
# OR there is no xwindows running, so no support for browser graphics
if [ "$serveronly." == "$true." ] || [ "$xorg." == "." -a $mac != 'Darwin' -a "$wait_for_x." != "." ]; then
# start server mode,
node serveronly
else
# start the server in the background
# wait for server to be ready
# need bash for this
exec 3< <(node serveronly)
if we do export external_browser
doesn’t that vanish as soon as the RPI is rebooted or if my session ends?
after a while the VNC client showed firefox start, but no URL, then the screen went white, then Firefox said “Unable to connect”
then I ran this script, I am tailing logs. What does “fix 'em up” script do
Execute fix'em-up script:
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
the last line is this: pm2 setup completed - Fri Jun 14 21:52:48 PDT 2024
cancelling the step DISPLAY=:0 npm start
allows me to rerun this step, but the step always ends in failure.
UPDATE: “Unable to connect” is because Firefox cannot connect to the node server. VNC can connect without issue! The error is actually an error from the Firefox browser.