Read the statement by Michael Teeuw here.
MagicMirror on second Monitor
-
@Babene1 you should have two X11 DISPLAY objects…
the default is :0 (which we set in the mm.sh script and in the package.json START clause, if it is not set
"scripts": { "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
so you shouldn’t need the electronOptions settings, just set the display variable
export DISPLAY=??xrandr --query
should give you the list of displays
note this is the X11 term, the Wayland value is different
when I do xrandr on my pi5 with wayland (only ‘one’ screen) I see
xrandr --query Screen 0: minimum 16 x 16, current 3840 x 2160, maximum 32767 x 32767 XWAYLAND14 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 3840x2160 29.98*+ 2048x1536 29.95 1920x1440 29.95 1600x1200 29.95 1440x1080 29.86 1400x1050 29.98 1280x1024 29.90 1280x960 29.82 1152x864 29.92 1024x768 29.89 800x600 29.55 640x480 29.85 320x240 27.50 2560x1600 29.99 1920x1200 29.95 1680x1050 29.95 1440x900 29.91 1280x800 29.83 720x480 29.25 640x400 29.58 320x200 26.53 3200x1800 29.96 2880x1620 29.96 2560x1440 29.94 2048x1152 29.94 1920x1080 29.95 1600x900 29.92 1368x768 29.94 1280x720 29.93 1024x576 29.84 864x486 29.50 720x400 29.51 640x350 29.03
-
@Babene1 I have run two monitors one landscape, one portait with MM on each
using the electronOptions:{} settings.the cursor moves over both seamlessly.
that is one big display space.
the xrandr command will tell you …do you have two complete independant desktops?
-
@sdetweil With the displays showing “HDMI-A-1” etc, it’s in Wayland, xrandr doesn’t function under that. This is part of why I suggested going back to X11.
-
@BKeyport xrandr --query worked while running wayland, output above
wlr-randr does not do --query
-
@sdetweil Ahh, ok, I thought it was completely dead. Good to know.
-
You are absolutely brilliant, now it works.
I change in “raspi-config” to x11 desktop environment and now magicmirror run on second monitor.Thank you all for your tips
-
-
@BKeyport I believe you are right. I had the same issue. I tried to run the xrandr query and I could not print the displays. I looked everywhere, the only solution I found was to switch back to X11. This was the only way to get the electron option to treat the screen as a single screen and move the display to the second monitor.
Anyway, thanks a lot, reading this post solved my problem and I was trying to figure it out for a while !