Read the statement by Michael Teeuw here.
dedicated monitor for MM??
-
I’ve just started with MM and am trying to use our TV, as the main monitor for Magic Mirror. I have tried to understand the information I have found online but when I implement it it fails. The docs say to add electronOpitions {x: 1920} to the config.js file.
Here is the start of my config.js file:let config = {
electronOptions: {x: 1680},
address: “localhost”, // Address to listen on, can be:Naturally there is comments before this and a whole lot after it but this is what I understand was to be added. The 1680 is the width of my smaller, 21", monitor as reported by the RPI display information. My other monitor is 1920.
It was my impression that the X: 1680 would keep MM from using that monitor and force it to the larger on. When it didn’t happen like I thought it should I looked at the error log and discovered there is some error I have not been able to resolve. Error log follows:
0|MagicMir |
0|MagicMir | [1387:0731/194921.175901:ERROR:ui/events/platform/wayland/wayland_event_watcher.cc:47] libwayland: wl_shm_pool#47 still attached
0|MagicMir |
0|MagicMir | [2846:0731/195036.124888:ERROR:ui/events/platform/wayland/wayland_event_watcher.cc:78] Fatal Wayland communication error: Broken pipe.
0|MagicMir | [2846:0731/195036.125228:FATAL:electron/shell/browser/electron_browser_main_parts.cc:502] Failed to shutdown.
0|MagicMir | [1395:0801/090349.588565:ERROR:ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc:161] Invalid state when trying to start drag. source=kMouse
0|MagicMir | /home/ron/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
0|MagicMir | Gdk-Message: 09:06:17.724: Error reading events from display: Broken pipe
0|MagicMir | /home/ron/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
0|MagicMir | [2025-08-01 15:00:38.013] [ERROR] Your configuration file contains syntax errors :(
0|MagicMir | Line 12 column 34: Parsing error: Unexpected token heightI copied everything from where the errors start down to the line for electronOptions the last line above is what I’m having trouble comprehending.
I have researched the error message and not found anything that made sense to me. The errors about that I have no idea what they mean. If someone could explain why the electronOptions is failing I would be happy. It is a direct copy from what I found online. I also tried the width: Height: suggestion I found but that didn’t help either.One other little thing that happens is if I reboot the computer, RPI 4, MM comes up on the monitor I want. If I restart MM after making a change to config.js it comes up on the smaller monitor, the only way to get it back to the larger one is to reboot the computer.
Thanks for sticking with me for this long message. I appreciate any and all help.
Ron R
-
@RonR do you have two monitors? tv as one
that is the only time the electron options make a difference
as linux uses both displays as one big space -
Thanks Sam, I have a smaller Dell monitor that I use for working and the 32" Philips TV/Monitor connected via HDMI. I want the large screen to have MagicMirror on it all the time but if I make a config change it restarts and put MM on the smaller Dell monitor. I do not understand the errors it is creating as I know literally nothing about java script.
-
@RonR both are attached hdmi?
is the pi desktop over both at once?
-
Yes, the desktop is spread over both monitors. The bar is on the little monitor and the big monitor only has wallpaper until MM loads at boot. When I restart MM it moves to the small monitor leaving the big one with just wall paper.
-
@RonR ok, electron remembers some things,
stop MagicMirror
cd ~ rm -rf .config/Electron
before starting MagicMirror, make sure you have the
electronOptions:{ x:....}
in config.js
start MagicMirror -
Sam,
I’m not trying to be difficult but you suggest I delete the config/electron directory? Does the system reconstruct that directory when MM is restarted?As for the electronOptions {X: 1680} do I use the width of the monitor I want MM displayed on or is it the monitor I do not want it displayed on. The larger monitor has a width of 1920.
Sorry I don’t mean to be so dense but I want to understand what I’m doing.
Thanks
-
@RonR electron will rebuild the .config/Electron folder on 1st startup
you use the width of the ‘left’ monitor, to move the start of the MM page to the ‘right’ monitor
I do this on my dual screen system all the time.
funny, now mine is stuck on screen 2… lol…
-
OK, that helps make sense now.
Thanks