How to open two instances of Chrome kiosk mode in different displays (Windows) How to open two instances of Chrome kiosk mode in different displays (Windows) google-chrome google-chrome

How to open two instances of Chrome kiosk mode in different displays (Windows)


This code worked fine for me:

start C:\Users\terminal\AppData\Local\Google\Chrome\Application\chrome.exe --app="http://www.domain1.com" --window-position=0,0 --kiosk --user-data-dir=c:/monitor1start C:\Users\terminal\AppData\Local\Google\Chrome\Application\chrome.exe --app="http://www.domain2.com" --window-position=1680,0 --kiosk --user-data-dir=c:/monitor2

I think the order of the parameters is relevant.


I have the same issue also. This answer: https://stackoverflow.com/a/3750187/1305565 inspired me to create own PowerShell script for easier use.

Shortly

Script does the following:

  1. Start a Chrome instance via script
  2. Now use WinApi to find started window and move it to the desired screen
  3. Send F11 key to the moved window to make it full screen (we could start chrome already in full screen mode, but moving windows in that mode would be not so trivial)
  4. Do the same with other instances, specifying necessary URL.

Final script

Function definitions are hidden in Dll and in another helper script. (download them from GitHub using the link above)

$chromePath = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'$chromeArguments = '--new-window --incognito'# &taskkill /im chrome* /F Chrome-Kiosk 'http://google.com' -MonitorNum 1 Chrome-Kiosk 'http://http://www.bbc.com/' -MonitorNum 2 


The easiest way to accomplish this is to use 2 different data directories. You may or may not want to delete the preferences before launching. If you do, your script can control where screens are placed. If you don't, then they can be manually positioned and it will remember the position of both windows separately:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:/screen1 --start-fullscreen --new-window www.domain.com --new-window "%1" --window-position=0,0"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:/screen2 --start-fullscreen --new-window www.domain2.com --new-window "%2" --window-position=1680,0

Note, I also used --start-fullscreen instead of kiosk, and --new-window. You may or may not need those.