I am trying to set up a digital display board using a Raspberry Pi 4 running the latest release of Rasbian Version 10(buster). The script needs to launch 2 chromium browser windows in kiosk mode, and set each window to it's own monitor.
With the way my code is now if I manually launch the shell script from bash, it works and does what it is supposed to. But, I need to to be launched with a service so the display comes up after a power outage. When the .sh script is launched by the service the widows both open, but are loaded onto a single monitor.
This is all a fresh install, so the versions of unclutter and sed would be the latest release as of Jan 11,2021.
xset s noblank
xset s off
unclutter -root &
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/chromium/Default/Preferences
/usr/bin/chromium-browser --new-window --no-first-run --incognito --noerrdialogs --disable-infobars --kiosk <web page link> --window-position=0,0 --user-data-dir="Monitor1" &
/usr/bin/chromium-browser --new-window --no-first-run --incognito --noerrdialogs --disable-infobars --kiosk <second web page link> --window-position=1920,0 --user-data-dir='Monitor2'
Description=Community Display launcher
I have tried setting up separate services for each window, as I think the "Environment=DISPLAY=:0.0" is what is causing the issue. However I have yet to find the correct combination of words to put into google to find what the Raspberry Pi 4 labels the second monitor as. I have tried :1.0 and :0.1 assuming it is an array index.
running "w" in terminal I get the output:
USER TTY FROM [email protected] IDLE JCPU PCPU WHAT
pi tty7 :0 Mon12 22:13m 51.41s 1.95s /usr/bin/lxsession -s LXDE-pi -e LXDE
pi tty1 - Mon12 22:12m 0.13s -bash
I have also sifted through journalctl, but can't find any error code(s) related to my service or script.
I have read through the "Similar Questions" suggested, but none have the solution I am looking for.