1
votes

I need to open 2 chrome windows in kiosk mode (or just fullscreen) on two separate monitors with a single click (.bat file)

This has been somewhat covered in How to open two instances of Chrome kiosk mode in different displays (Windows)

BUT:

The my web app running in the browser uses localstorage to transfer data from one chrome window to the other. So we can't use the --user-data-dir= startup flag which creates completely isolated instance of Google Chrome window.

-- The computer is running on Windows 10

Can somebody suggest another solution?

Thank you

1
Searching the web I found: developer.chrome.com/apps/storage . Can I run the the windows using "app" mode and than exchange data using chrome.storage API?Marakoss
something like this? "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --chrome --fullscreen --kiosk www.somesite.comGerhard
@GerhardBarnard Where is the part, where you move the window to secondary monitor?Marakoss

1 Answers

0
votes

I ended up using automation software that opened both instances of Chrome browser window and moved them in their specified display (by number of X pixels)

The software I used is AutoHotKey (AHK) https://autohotkey.com/ - only for Windows. You can use preinstalled Automator on Mac.

The script for AHK I wrote for my specific case:

Run, chrome.exe https://domain1/
WinWait, Titlebar Primary - Google Chrome
WinMove, 1920, 0  ; Move window by 1920px on X axis
Sleep, 1000

Run, chrome.exe https://domain2/
WinWait, Titlbar Secondary - Google Chrome
WinMove, 0, 0
WinActivate, Titlebar Secondary - Google Chrome
Sleep, 1000
Send, {F11}

Sleep, 1000
WinActivate, Titlebar Primary - Google Chrome
Send, {F11}

It identifies each window by name or "Titlebar".

The AHK software allows to create a single file that you can click on or make the script run at system startup.