MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED electron:837): Gtk-WARNING **: cannot open display: 0:

    Troubleshooting
    4
    7
    1581
    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.
    • Y
      yohu12 last edited by

      when run DISPLAY=0:0 npm start, i meet such error.

      root@raspberrypi:~/MagicMirror # DISPLAY=0:0 npm start
      
      > magicmirror@2.8.0 start /root/MagicMirror
      > sh run-start.sh
      
      
      (electron:837): Gtk-WARNING **: cannot open display: 0:0
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! magicmirror@2.8.0 start: `sh run-start.sh`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.8.0 start script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /root/.npm/_logs/2019-08-01T14_29_27_057Z-debug.log
      

      I have update the raspi-config to start with command line and text boot.
      But error still here.
      Any one can help me???

      S 1 Reply Last reply Reply Quote 0
      • Y
        yohu12 last edited by

        And I can run startx to show the desktop screen on the monitor. only npm start is not work.

        1 Reply Last reply Reply Quote 0
        • S
          sdetweil @yohu12 last edited by sdetweil

          @yohu12 do it in two steps

          export DISPLAY=:0
          npm start
          

          Sam

          Create a working config
          How to add modules

          Y 1 Reply Last reply Reply Quote 0
          • Y
            yohu12 @sdetweil last edited by

            @sdetweil said in electron:837): Gtk-WARNING **: cannot open display: 0::

            export DISPLAY=:0

            It return same error

            (electron:1493): Gtk-WARNING **: cannot open display: :0
            
            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @yohu12 last edited by

              @yohu12 this is the same as MagicMirror/installers/mm.sh

              Are u doing this over vpn?

              Also the operating system must have xwindows running…

              Sam

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • _
                __willo__ last edited by

                I saw this error because the raspi was set to Autologin as “pi” and I had created another user which could not take control of the display.

                1 Reply Last reply Reply Quote 0
                • Corben Dallas
                  Corben Dallas last edited by Corben Dallas

                  I saw this just yesterday (followed by a few other warnings). Solution was to follow pretty much this ancient but still working how-to for jessie:
                  jessie-lite-installation-guide
                  (especially points describing “Install Xserver, LXDE-gui and lightdm” and missing packages)

                  Raspberry Pi 4
                  Raspbian Buster
                  MagicMirror² v2.8.0

                  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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy