Starting multiple Chrome full screen instances on multiple monitors from (batch) script

18,132

Solution 1

The way I was able to start three full screen browsers up on three screens is by doing the following:

  • Install Google Chrome, Chromium and Google Chrome Canary build. These are three versions of the Chrome/Chromium browser that can be installed (on Windows) next to each other.
  • Start each of the browsers on a different screen by using the --window-position= command line option
  • Use the --kiosk command line option to make them turn full screen

This is not a very nice solution since you can only use this for a maximum of three browser instances, but it works.

Added tip: By adding the following additional command line options the browser will not show banners and unwanted pages;

--chrome-frame --disable-first-run-ui --no-default-browser-check --disable-translate

Solution 2

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 

Solution 3

I have managed to solve it with different user profiles.

First time to set it up, you start Chrome, without kiosk-mode, and with a random user data dir. (This does not have to exists, Chrome creates it.)

chrome.exe --user-data-dir="%userprofile%/AppData/Local/Google/Chrome/User Data/monitor1" "http://example.com/monitor1.html"

Then move it to correct monitor and close Chrome again. (The position get saved in the user profile.)

Then just to fire it up in autostart with kisok mode:

chrome.exe --user-data-dir="%userprofile%/AppData/Local/Google/Chrome/User Data/monitor1" --kiosk "http://example.com/monitor1.html"

Do the same for the rest of the monitors. Every Chrome with different user dir is totally independent. (I also use this to have separate proxy settings on Chrome running next to each other.)

Share:
18,132

Related videos on Youtube

Bob Groeneveld
Author by

Bob Groeneveld

Hoping to answer more questions than I ask.

Updated on September 18, 2022

Comments

  • Bob Groeneveld
    Bob Groeneveld over 1 year

    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.