Starting Multiple Chrome Full Screen Instances on Multiple Monitors from Script

firefoxgoogle-chromelinuxmultiple-monitorswindows

My goal is to show different web content full screen on multiple monitors automatically after booting from a single computer. The browser I would like to use is Chrome. If Chrome does not support this and Firefox does that would be fine.

The OS I would prefer is Windows, if it turns out that Linux is possible that would be fine.

On Windows it is possible to set the position of the Chrome browser window (–window-position=) and make Chrome start in full screen mode (–kiosk). Using these options combined you can start Chrome full screen on any of the desktops/screens that you have connected to your computer. I have managed to get this working.

However, if I then try to do the same thing a second time to have Chrome full screen on a second screen the second Chrome window will open over the first window, no matter the coordinates I use for the –window-position parameter.

I have tried using Chrome profiles and copying the Chrome directory and starting the second chrome.exe. All these things result in the same behaviour.

Best Answer

I've decided to create my own powershell script based on WinApi calls:

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.

My final script (function definitions are hidden in Dll and another helper script) looks like the following:

$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 
Related Question