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.

    Black Screen "Electron" after updating MM

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    17 Posts 2 Posters 4.6k Views 2 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.
    • S Offline
      sdetweil @RIKKO14
      last edited by

      @RIKKO14 pm2 --help will give you the pm2 commands

      but

      pm2 stop all

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • R Offline
        RIKKO14
        last edited by

        @sdetweil
        I do this :
        1 .jpg
        but nothing…

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

          @RIKKO14 correct… in linux most commands return nothing if successful…

          so that is good… you asked to erase a folder
          and it did that

          now restart MagicMirror

          pm2 start MagicMirror

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          R 1 Reply Last reply Reply Quote 0
          • R Offline
            RIKKO14 @sdetweil
            last edited by

            @sdetweil Nothing has changed3 .jpg

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

              @RIKKO14 fun… try this

              we need to edit a js file

              cd ~/MagicMirror/js
              nano electron.js
              

              scroll down to

              	let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;
              

              add a bank line after

              on the blank line, copy/paste these lines

              	mainWindow.webContents.on("new-window", function(event, url) {
                    event.preventDefault();
                    // This will open a new Electron window to load the url.
                    shell.openExternal(url);
                });
              

              so it looks like this when you are done

              	let address = (config.address === void 0) | (config.address === "") ? (config.address = "localhost") : config.address;
              	mainWindow.webContents.on("new-window", function(event, url) {
                    event.preventDefault();
                    // This will open a new Electron window to load the url.
                    shell.openExternal(url);
                });
              	mainWindow.loadURL(`${prefix}${address}:${config.port}`);
              

              ctrl-o to save the file
              ctrl-x to exit nano
              cd …

              then

              pm2 restart MagicMirror

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • R Offline
                RIKKO14
                last edited by

                @sdetweil after doing this :

                cd ~.MagicMirror/js
                nano electron.js
                

                I have this :
                4 .jpg

                So I can’t scroll anywhere…

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

                  @RIKKO14 sorry typo, try again

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    RIKKO14
                    last edited by RIKKO14

                    I tryed 2 times with space and with not space before
                    mainWindow.webContents.on (...)
                    https://zupimages.net/viewer.php?id=22/34/77nw.jpg
                    but style the same…
                    5 .jpg

                    S 2 Replies Last reply Reply Quote 0
                    • S Offline
                      sdetweil @RIKKO14
                      last edited by sdetweil

                      @RIKKO14 can’t see the image. u can just upload here, 3 icon from right in editor

                      tabs don’t matter

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @RIKKO14 do u have a real display on pi?
                        or using vnc all the time?

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          RIKKO14
                          last edited by

                          I use VNC to tape the commands but I have the same screen on my Pi MagicMirror

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

                            @RIKKO14 can u open the advert tab and see what it is? there shouldn’t be any advert showing from MM content

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • 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