I'm setting up a dual screen kiosk (with both screens in portrait mode) using a raspberry pi 4 with raspbian lite, openbox and chromium-browser, that shows 2 static web pages (i.e. advertising), but I can't get it to work properly. I put the code below in the /etc/xdg/openbox/autostart script:
#Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms
#Setup screens
xrandr --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate left
xrandr --output HDMI-2 --mode 1920x1080 --pos 0x1920 --rotate left
#Allow quitting the X server with CTRL-ALT-Backspace
setxkbmap -option terminate:ctrl_alt_bksp
#Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --new-window --incognito --disable-infobars --window-position=0,0 --kiosk --user-data-dir=/tmp/monitor1 'https://[left-screen-url]'
chromium-browser --new-window --incognito --disable-infobars --window-position=0,1920 --kiosk --user-data-dir=/tmp/monitor2 'https://[right-screen-url]'
where the [left-screen-url] and [right-screen-url] are in fact the full urls for both screens respectively.
The problem is it only shows the left-screen page and leaves the right screen blank. When I comment out the second to last line (the first chromium-browser command), the left screen stays blank (as expected), BUT now the right screen works perfectly! What can I do to make it so that it shows both screens at the same time?
Many thanks!