I'm developing web-app that will run on terminal with two monitors (vertical set-up). On terminal there is installed linux mint. I need to open 2 different instances of google-chrome on 2 different monitors, but on same session.
So far I've reached this:
#clear any cache from previous run of terminal
rm -rf /dev/shm/Chrome
mkdir -p /dev/shm/Chrome
export DISPLAY=:0.0
exec /usr/bin/google-chrome \
--display=":0.0" \
--new-window \
--no-sandbox \
--disable-setuid-sandbox \
--start-maximized \
--kiosk-printing \
--start-fullscreen \
--user-data-dir=/dev/shm/Chrome \
--no-first-run \
'http://google.com/'
second script
#second instance started in different place
export DISPLAY=:0.1
exec /usr/bin/google-chrome \
--display=":0.1" \
--new-window \
--no-sandbox \
--disable-setuid-sandbox \
--start-maximized \
--kiosk-printing \
--start-fullscreen \
--user-data-dir=/dev/shm/Chrome \
--no-first-run \
'http://google.com/'
It does: open two different windows of google chrome & opens them full screen.
However, if they share profile (in this case --user-data-dir=/dev/shm/Chrome) they will open on same display.
If it is different folder for them, then they will open on different monitors, but they will not share same session, which I do need for further development. I plan to use broadcast-channel-api, example could be found here: https://github.com/irekrog/broadcast-channel-api-simple-example . If Chrome does not share session, it is impossible to communicate with broadcast channel.
note: also tag --window-position=X,Y does not seem to work and just breaks everything if they're on same session
There is clone of this question for windows: How to open two instances of Chrome kiosk mode in different displays (Windows) But I need solution for linux, I don't believe I have access to WinApi as in accepted answer there.
Any solutions or workaround are appreciated