Read the statement by Michael Teeuw here.
Electron Error: Cannot open display :0
-
I had the same error, and the problem turned out to be that on first boot I had decided to reconfigure the pi to boot to the console rather than the desktop. Consequently I didn’t have a x server running (doh!)
You didn’t mention that as one of your setup steps, but I though it might be worth mentioning. -
@rudibarani said in Electron Error: Cannot open display :0:
setup wifi, keyboard, CLI-boot
you ARE running the GUI desktop, right… NOT commandline.
-
I am now :)
-
@bream @sdetweil Thank you very much for your reply! This could be the right path! I have initially configured the Pi on the GUI surface (Wifi, Keyboard) and then switched to CLI boot. I have done this with my previous installations of MagicMirror without problems, as electron started the x-server as needed. This does not seem to work anymore…
How do I revert this? I have changed back from CLI-boot to Desktop GUI in raspi-config. If I ssh into the pi and start MagicMirror via
DISPLAY=:0 npm start
, the application claims to start without problems:> magicmirror@2.5.0 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.5.0 Loading config ... Loading module helpers ... No helper found for module: alert. Initializing new module helper ... Module helper loaded: updatenotification No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: compliments. No helper found for module: currentweather. No helper found for module: weatherforecast. Initializing new module helper ... Module helper loaded: newsfeed All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: updatenotification Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: newsfeed Starting module: newsfeed Sockets connected & modules started ... Launching application.
Unfortunately, the display still just shows the GUI of the operation system.
Could you please help me from here?Thank you very much!
-
@rudibarani i only do npm start from my ssh session
do u have a keyboard on the pi? if so, ctrl-alt-t will open a shell window… then u should be able to get to the previous command with up arrow…