MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Electron Error: Cannot open display :0

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    6 Posts 3 Posters 7.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bream
      last edited by bream

      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.

      rudibaraniR 1 Reply Last reply Reply Quote 1
      • S Do not disturb
        sdetweil
        last edited by

        @rudibarani said in Electron Error: Cannot open display :0:

        setup wifi, keyboard, CLI-boot

        you ARE running the GUI desktop, right… NOT commandline.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • B Offline
          bream
          last edited by

          I am now :)

          1 Reply Last reply Reply Quote 0
          • rudibaraniR Offline
            rudibarani Project Sponsor @bream
            last edited by

            @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!

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @rudibarani
              last edited by

              @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…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy