Read the statement by Michael Teeuw here.
Magic mirror dual screen
-
copy the second config.js to the first mm config directory as config2.js
edit the mm2.sh
cd to the first mm directory(instead of the second)
and add a lineexport MM_CONFIG_FILE=${cwd}/config/config2.js
npm startnow. make sure all the modules needed by both instances are installed in the modules folder of the 1st instance.
if they aren’t used by a particular instance, no big deal, same as setting disabled:true on a module config
-
Interesting - although, now, it’s ignoring the
electronOptions:item. -
Here’s the answer for @1a2a3a (Edited to show below changes)
Here’s how to do it cleanly: (replace
<username>with your pi login name., with width of first monitor)- create two starting scripts:
First,
mm.shis as follows:cd /home/<username>/MagicMirror DISPLAY=:0 npm startSecond,
mm2.shis as follows:cd /home/<username>/MagicMirror export MM_CONFIG_FILE=${pwd}/config/config2.js DISPLAY=:0 npm start- Two config files in magicmirror/config next:
First,
config.js(this is your second monitor):var config = { electronOptions: { x: <width> }, address: "0.0.0.0", port: 8080, ipWhitelist: [], language: "en", timeFormat: 12, units: "imperial", //logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"], modules: [ ...Second
config2.js(this is your first monitor):var config = { address: "0.0.0.0", port: 8081, ipWhitelist: [], language: "en", timeFormat: 12, units: "imperial", //logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"], modules: [ ...electronOptions will only work in the file that isn’t redirected to a new config - so use that in the
config.jsonly. -
@BKeyport nice description
-
@sdetweil I figured I might as well make it as clear as possible…
-
Thanks all! I’ll give this a go once the monitor arrives!
-
-
This post is deleted! -
@BKeyport I just fixed it
-
It has to be brackets on my system, FYI.
-
@BKeyport ok…
-
btw, how do i configure the css for the 2 screen?
-
@1a2a3a you would set the css filename in its config.js
so you would have css/custom.css and css/custom2.css, one for each instance
from the doc
https://docs.magicmirror.builders/configuration/introduction.htmlcustomCss The path of the custom.css stylesheet. The default is css/custom.css. -
@sdetweil alternatively, use the single custom.css file if there’s no conflict.
-
@BKeyport yeh but I assumed there was a conflict, else he wouldn’t have known there was an issue.
-
Decided to drop this for now guys. The new monitor is a 27 qhd compared to the previous 24 fhd. With the extra real estate, everything doesn’t seems to be so cluttered now.
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