• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Multiple screens fo MM.

Scheduled Pinned Locked Moved General Discussion
36 Posts 13 Posters 21.3k Views 15 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.
  • K Offline
    kayakbabe @hogedir
    last edited by Sep 6, 2022, 12:45 AM

    @hogedir With a raspberry 4 you can have two displays. I’m thinking they can be set up as an extended desktop . Then it’s no big deal with the default magic mirror.
    Top_left and top_right would end up being left and right…
    I haven’t tried this with MM. But I have used my pi with two screens. But in my mind it ought to work with MM.
    Just don’t use the middle_center or any position that would span across both monitors.

    H 1 Reply Last reply Sep 6, 2022, 1:01 AM Reply Quote 0
    • H Offline
      hogedir @kayakbabe
      last edited by Sep 6, 2022, 1:01 AM

      @kayakbabe I think we need two electron display, so it’s not quite easy. it’s not just top_left and top_right. I need 2 MMM, 1 magic mirror per screen.

      B 1 Reply Last reply Sep 6, 2022, 1:52 AM Reply Quote 0
      • S Offline
        sdetweil @hogedir
        last edited by sdetweil Sep 6, 2022, 1:19 AM Sep 6, 2022, 1:19 AM

        @hogedir electron (and other browsers) runs maximized, which is only one screen…

        you can DRAG the edge to make the window larger, but cannot maximize over two screens…

        you can run separate instances of MM on each display…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • B Offline
          BKeyport Module Developer @hogedir
          last edited by Sep 6, 2022, 1:52 AM

          @hogedir I had two running off one display, just two different Magicmirror installs. I forgot how it works though, was using them as a temporary menu display.

          Something about calling different config files if I recall right.

          The "E" in "Javascript" stands for "Easy"

          S K 2 Replies Last reply Sep 6, 2022, 2:20 AM Reply Quote 0
          • S Offline
            sdetweil @BKeyport
            last edited by Sep 6, 2022, 2:20 AM

            @BKeyport MM_CONFIG environment variable

            allows the different configs off the same directory tree

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • K Offline
              karam @BKeyport
              last edited by Sep 10, 2022, 3:35 AM

              @BKeyport this answer inspired me to test it, so I have a solution:

              1. create two different folders.
              2. configure each install as you like.
              3. edit each electron file in each folder “js/electron.js”
              4. change the default resolution and position based on your screens.
                here is my config:
              let electronOptionsDefaults = {
                              width: 1280,
                              height: 1024,
                              x: 1366,
                              y: 0,
                                           }
              

              NOTE: there are many better methods (electron-multi-monitor for example) but this is the easiest that I could find

              S 1 Reply Last reply Sep 10, 2022, 10:42 AM Reply Quote 0
              • S Offline
                sdetweil @karam
                last edited by sdetweil Sep 10, 2022, 1:54 PM Sep 10, 2022, 10:42 AM

                @karam u can set the electronOptions in config.js, you don’t need to edit the source file

                then you can do it with one folder,
                and two config files

                environment variable
                MM_CONFIG=config1.js
                for one

                and
                MM_CONFIG=config2.js
                for the other

                all modules for both are installed in modules folder, only ones referenced in config file are used

                installers/mm.sh is the script used by my pm2 setup routine
                copy that to mm2.sh
                and then add the export MM_CONFIG=
                to each

                then copy the pm2_magicmirror.json
                and change the title and the mm.sh filename

                then pm2 start installers/??? (whatever name u copied the json file to for the second mm)
                pm2 save
                then on reboot you will get both

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                C S 2 Replies Last reply Oct 22, 2022, 6:56 PM Reply Quote 1
                • C Offline
                  cburchett @sdetweil
                  last edited by Oct 22, 2022, 6:56 PM

                  @sdetweil: can you please share an example? I am not sure how to indicate the secondary display in the config files. Thank you!

                  S 1 Reply Last reply Oct 22, 2022, 8:03 PM Reply Quote 0
                  • S Offline
                    sdetweil @cburchett
                    last edited by Oct 22, 2022, 8:03 PM

                    @cburchett it’s one big display, so you have to tell it how far from the left edge to start this display.
                    see
                    https://forum.magicmirror.builders/topic/6623/multiple-screens-fo-mm/18?_=1666468889775

                    only need x for horizontal monitors
                    or y for vertical

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    C 1 Reply Last reply Oct 22, 2022, 9:39 PM Reply Quote 0
                    • S sdetweil referenced this topic on Oct 22, 2022, 8:03 PM
                    • C Offline
                      cburchett @sdetweil
                      last edited by Oct 22, 2022, 9:39 PM

                      @sdetweil Perfect! Thank you.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 2 / 4
                      • 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