We are developing a web application that needs to open in two different browser instances each on a different Screen. Obviously the pc we are using has dual display already, and both monitors have the same size and resolution.
The idea is that as soon as Windows starts the two applications should open immediately in fullscreen, our preferred browser is Chrome as it counts with several commands that might help us accomplish the task.
We have succeeded on adding to the startup programs two shortcuts that open two instances in kiosk mode, but we have not been able to choose on which Display to open.
The shortcuts have this target:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:\temp --kiosk www.domain.com --new-window "%1" --window-position=0,0 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:\temp --kiosk www.domain2.com --new-window "%2" --window-position=1680,0
In order to open two instances chromes needs to create a temporary file with information of the instance to open (--user-data-dir=c:\temp)
We tried using (--window-position=1680,0
) to specify where to open the instance but it seems that Chrome will give priority to the last position where the last instance was opened, so both instances open on the same window regardless of the command.
We found this site with a list of all the commands available but the list is huge and we don't even know what we are looking for:
http://peter.sh/experiments/chromium-command-line-switches/
I found this command: --display=:0.0 | --display=:0.1
But it doesn't seem to work or I am not using it properly
Any ideas? Thanks.
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:/monitor1 start 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.
Script does the following:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With