MagicMirror Forum
    • 最新
    • 標籤
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • 註冊
    • 登入
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10

    已排程 已置頂 已鎖定 已移動 Troubleshooting
    324 貼文 55 Posters 783.4k 瀏覽 59 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • D 離線
      DanClarkCBET3
      最後由 編輯

      Is there a way to make a desktop shortcut to start MagicMirror?

      S 1 條回覆 最後回覆 回覆 引用 0
      • S 離線
        sdetweil @DanClarkCBET3
        最後由 sdetweil 編輯

        @DanClarkCBET3 sure. create a batch file

        mm.cmd

        in the installers folder, and then use that for the shortcut

        mm.cmd should do

        @npm start

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 條回覆 最後回覆 回覆 引用 0
        • C 離線
          CheapDad
          最後由 編輯

          My apologies if the answer to my question is located somewhere in this long thread. As a quick method of bringing some MM functionality to my kids in college, I’d like to install MM onto their laptops and have it autorun at start (like a batch file) and run in a small window.

          I see that I can install it on their laptops and I know how to create a batch file, but what I don’t know is how to ensure that a linux program starts in a windows batch file and how to get it to autosize to a small window.

          Has anyone done that?

          S 1 條回覆 最後回覆 回覆 引用 0
          • S 離線
            sdetweil @CheapDad
            最後由 編輯

            @CheapDad use PM2 to auto launch

            this is a node application

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            mumblebajM 1 條回覆 最後回覆 回覆 引用 0
            • mumblebajM 離線
              mumblebaj Module Developer @sdetweil
              最後由 編輯

              @sdetweil Don’t think it is an easy straight forward setup for PM2 on Windows to launch the mirror or am I mistaken? Would he have to setup pm2-windows-service and then perform some other setups to get PM2 to work to launch MM on Windows at startup?

              Check out my modules at: https://github.com/mumblebaj?tab=repositories
              Check my blog-post: https://mumblebaj.xyz/
              Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

              S 1 條回覆 最後回覆 回覆 引用 0
              • S 離線
                sdetweil @mumblebaj
                最後由 編輯

                @mumblebaj pm2 setup does all that …

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                mumblebajM 1 條回覆 最後回覆 回覆 引用 0
                • mumblebajM 離線
                  mumblebaj Module Developer @sdetweil
                  最後由 編輯

                  @sdetweil :thumbs_up:

                  Check out my modules at: https://github.com/mumblebaj?tab=repositories
                  Check my blog-post: https://mumblebaj.xyz/
                  Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                  S 1 條回覆 最後回覆 回覆 引用 0
                  • S 離線
                    sdetweil @mumblebaj
                    最後由 sdetweil 編輯

                    @mumblebaj I was wrong for windows, and setup
                    see here
                    https://stackoverflow.com/questions/42758985/windows-auto-start-pm2-and-node-apps

                    still pm2 is the easiest and same on every platform…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    mumblebajM 1 條回覆 最後回覆 回覆 引用 0
                    • mumblebajM 離線
                      mumblebaj Module Developer @sdetweil
                      最後由 編輯

                      @CheapDad Here is a great tutorial to set up PM2 on Windows.
                      https://blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75

                      Check out my modules at: https://github.com/mumblebaj?tab=repositories
                      Check my blog-post: https://mumblebaj.xyz/
                      Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                      1 條回覆 最後回覆 回覆 引用 0
                      • C CheapDad referenced this topic on
                      • B 離線
                        Bobrae
                        最後由 編輯

                        When following your instructions on both Windows 7 and 10 machines, I get the following error message:

                        magicmirror@2.20.0 start C:\Users\Admin\MagicMirror
                        DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js
                        ‘DISPLAY’ is not recognized as an internal or external command,
                        operable program or batch file.

                        The error log gives the following:
                        0 info it worked if it ends with ok
                        1 verbose cli [
                        1 verbose cli ‘C:\Program Files\nodejs\node.exe’,
                        1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
                        1 verbose cli ‘start’
                        1 verbose cli ]
                        2 info using npm@6.14.4
                        3 info using node@v13.14.0
                        4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
                        5 info lifecycle magicmirror@2.20.0~prestart: magicmirror@2.20.0
                        6 info lifecycle magicmirror@2.20.0~start: magicmirror@2.20.0
                        7 verbose lifecycle magicmirror@2.20.0~start: unsafe-perm in lifecycle true
                        8 verbose lifecycle magicmirror@2.20.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\MagicMirror\node_modules.bin;C:\Users\Admin\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Admin\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\php;C:\Program Files\Calibre2;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Users\Admin\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
                        9 verbose lifecycle magicmirror@2.20.0~start: CWD: C:\Users\Admin\MagicMirror
                        10 silly lifecycle magicmirror@2.20.0~start: Args: [
                        10 silly lifecycle ‘/d /s /c’,
                        10 silly lifecycle ‘DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js’
                        10 silly lifecycle ]
                        11 silly lifecycle magicmirror@2.20.0~start: Returned: code: 1 signal: null
                        12 info lifecycle magicmirror@2.20.0~start: Failed to exec start script
                        13 verbose stack Error: magicmirror@2.20.0 start: DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                        13 verbose stack Exit status 1
                        13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
                        13 verbose stack at EventEmitter.emit (events.js:315:20)
                        13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
                        13 verbose stack at ChildProcess.emit (events.js:315:20)
                        13 verbose stack at maybeClose (internal/child_process.js:1026:16)
                        13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
                        14 verbose pkgid magicmirror@2.20.0
                        15 verbose cwd C:\Users\Admin\MagicMirror
                        16 verbose Windows_NT 6.1.7601
                        17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “start”
                        18 verbose node v13.14.0
                        19 verbose npm v6.14.4
                        20 error code ELIFECYCLE
                        21 error errno 1
                        22 error magicmirror@2.20.0 start: DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                        22 error Exit status 1
                        23 error Failed at the magicmirror@2.20.0 start script.
                        23 error This is probably not a problem with npm. There is likely additional logging output above.
                        24 verbose exit [ 1, true ]

                        S 1 條回覆 最後回覆 回覆 引用 0
                        • S sdetweil referenced this topic on
                        • S 離線
                          sdetweil @Bobrae
                          最後由 編輯

                          @Bobrae see
                          https://forum.magicmirror.builders/topic/4089/complete-walkthrough-install-magicmirror-on-a-pc-windows-7-10/225?_=1659891805957

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 條回覆 最後回覆 回覆 引用 0
                          • S sdetweil referenced this topic on
                          • Cliff365C 離線
                            Cliff365 @Mykle1
                            最後由 編輯

                            @Mykle1 First off, thanks so much for a great guide. I’m having what is likely a simple issue, but I can’t figure out how to resolve it. I am getting the following error message with the npm start command. Not concerned about the warnings, but how do resolve the DISPLAY issue?

                            $ npm start
                            npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
                            
                            > magicmirror@2.20.0 start
                            > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                            
                            'DISPLAY' is not recognized as an internal or external command,
                            operable program or batch file.
                            
                            cliff@BNC-LAB01 MINGW64 ~/MagicMirror (master)
                            $
                            
                            S 1 條回覆 最後回覆 回覆 引用 0
                            • S 離線
                              sdetweil @Cliff365
                              最後由 sdetweil 編輯

                              @Cliff365 see the end of the post I just linked to in the prior post

                              also, do not run under mingw… just cmd.exe

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 條回覆 最後回覆 回覆 引用 0
                              • Cliff365C 離線
                                Cliff365 @Mykle1
                                最後由 編輯

                                @Mykle1 Thanks for your help on the DISPLAY issue. I changed the line in packages.json file to:

                                “start”: “node_modules/.bin/electron js/electron.js”,

                                I get the following error message back:

                                > magicmirror@2.20.0 start
                                > node_modules/.bin/electron js/electron.js
                                
                                'node_modules' is not recognized as an internal or external command,
                                operable program or batch file.
                                
                                S 1 條回覆 最後回覆 回覆 引用 0
                                • S 離線
                                  sdetweil @Cliff365
                                  最後由 sdetweil 編輯

                                  @Cliff365 you didn’t follow all of the last line of
                                  https://forum.magicmirror.builders/topic/4089/complete-walkthrough-install-magicmirror-on-a-pc-windows-7-10/225?_=1660158299123

                                  ps, I’m not @Mykle1

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  Cliff365C D 2 條回覆 最後回覆 回覆 引用 0
                                  • Cliff365C 離線
                                    Cliff365 @sdetweil
                                    最後由 編輯

                                    @sdetweil Oops! Thanks sdetweil

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • D 離線
                                      dude31222 @sdetweil
                                      最後由 編輯

                                      Hey! @sdetweil i’ve spend more than 10 hours whit this because i didn’t read the entire thread. I’ve finally installed mm2 on a 32bit laptop whit w7 and node v16.6 but when i run npm start i just got a black screen. any ideas on how to find a solution? my cmd here:

                                      [08.01.2023 06:58.14.001] [LOG]   Starting MagicMirror: v2.22.0
                                      [08.01.2023 06:58.14.151] [LOG]   Loading config ...
                                      [08.01.2023 06:58.14.201] [LOG]   Loading module helpers ...
                                      [08.01.2023 06:58.14.231] [LOG]   No helper found for module: alert.
                                      [08.01.2023 06:58.14.361] [LOG]   Initializing new module helper ...
                                      [08.01.2023 06:58.14.371] [LOG]   Module helper loaded: updatenotification
                                      [08.01.2023 06:58.14.395] [LOG]   No helper found for module: clock.
                                      [08.01.2023 06:58.17.473] [LOG]   Initializing new module helper ...
                                      [08.01.2023 06:58.17.477] [LOG]   Module helper loaded: calendar
                                      [08.01.2023 06:58.17.497] [LOG]   No helper found for module: compliments.
                                      [08.01.2023 06:58.17.497] [LOG]   No helper found for module: weather.
                                      [08.01.2023 06:58.17.839] [LOG]   Initializing new module helper ...
                                      [08.01.2023 06:58.17.839] [LOG]   Module helper loaded: newsfeed
                                      [08.01.2023 06:58.17.849] [LOG]   No helper found for module: facts.
                                      [08.01.2023 06:58.17.849] [LOG]   All module helpers loaded.
                                      [08.01.2023 06:58.19.559] [LOG]   Starting server on port 8080 ...
                                      [08.01.2023 06:58.23.451] [LOG]   Launching application.
                                      [08.01.2023 06:58.29.838] [LOG]   Server started ...
                                      [08.01.2023 06:58.29.848] [LOG]   Connecting socket for: updatenotification
                                      [08.01.2023 06:58.29.848] [LOG]   Starting module helper: updatenotification
                                      [08.01.2023 06:58.29.848] [LOG]   Connecting socket for: calendar
                                      [08.01.2023 06:58.29.848] [LOG]   Starting node helper for: calendar
                                      [08.01.2023 06:58.29.858] [LOG]   Connecting socket for: newsfeed
                                      [08.01.2023 06:58.29.858] [LOG]   Starting node helper for: newsfeed
                                      [08.01.2023 06:58.29.858] [LOG]   Sockets connected & modules started ...
                                      [3460:0108/070022.937:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL i
                                      s disabled, ANGLE is
                                      
                                      
                                      S 1 條回覆 最後回覆 回覆 引用 0
                                      • S 離線
                                        sdetweil @dude31222
                                        最後由 編輯

                                        @dude31222 never tried win7 myself… this topic was created a while ago…

                                        you can TRY setting an environment variable in the cmd.exe window before executing npm start

                                        cd MagicMirror
                                        set ELECTRON_DISABLE_GPU=1
                                        npm start 
                                        

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        D 1 條回覆 最後回覆 回覆 引用 0
                                        • D 離線
                                          dude31222 @sdetweil
                                          最後由 編輯

                                          @sdetweil still having an empty screen but no more error messages in cmd

                                          S 1 條回覆 最後回覆 回覆 引用 0
                                          • S 離線
                                            sdetweil @dude31222
                                            最後由 sdetweil 編輯

                                            @dude31222 that usually means u didn’t do the fonts install step or vendor install step

                                            those are extra for windows install

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            D 1 條回覆 最後回覆 回覆 引用 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 💗

                                            註冊 登入
                                            • 1
                                            • 2
                                            • 13
                                            • 14
                                            • 15
                                            • 16
                                            • 17
                                            • 15 / 17
                                            • 第一個貼文
                                              最後的貼文
                                            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