Google Chrome Command Line Switches

9,152 views
Skip to first unread message

Everton Pestana

unread,
Apr 30, 2018, 3:07:05 AM4/30/18
to Chromium-discuss

Good Night for all!!!

I'm not a developer. I am an advanced user. I'm work with IT in a Telecomunication Company in Brazil.

I work monitoring servers and services and i use the Google Chrome to open the web pages of the monitoring services.

To get a view of the whole scenario I open 8 Gogle Chrome windows on 8 40" LFD monitors, each with different information. Every time I need to open each of the 8 windows, I have to resize the window and place it on the respective monitor, issp for each of the 8 windows. I was not satisfied with this situation and went to see the Google Chrome documentation via the command line, and found an interesting parameters --app="http://url" that open the browser window without any toolbar or address .. Open the window with specified URL only nothing else, with that I took a 100% use of the screen.Even so I still had to position the windows on their respective LFD monitors. more parameters where I discovered the --window-size= "px, px" and the --window-position="x, y".

The scenario is as follows:

As I said I have 8 LFD 40 "monitors, which are distributed side by side in 4 columns and 2 lines we have:

LFD1 LFD2 LFD3 LFD4.
LFD5 LFD6 LFD7 LFD8.

And each Google Chrome window respectively for each of them:

Position 1:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "http://ex.com" --window-position = 0,0 --window-size = 960,540

Position 2:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "http://ex.com" --window-position = 960,0 --window-size = 960,540

Position 3:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "http://ex.com" --window-position = 1920,0 --window-size = 960,540

Position 4:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "http://192.168.0.1" --window-position = 2880,0 --window-size = 960,540

Position 5:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "chrome-extension: //hehijbfgiekmjfkfjpbkbammjbdenadd/nhc.htm#url=http: //10.0.0.1/principal.php "--window-position = 0.540 --window-size = 960,540

Position 6:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "file: /// C: /Users/Administrator/Desktop/teste.html" --window-position = 960,540 --window-size = 960,540

Position 7:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "file: /// C: /Users/Administrator/Desktop/teste1.html" --window-position = 1920 , 540 --window-size = 960,540

Position 8:
"C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe" --app = "http://10.0.0.1" --window-position = 2880,540 --window-size = 960,540


If you look at the parameter. --window-position, it is different in each of the 8 positions, which makes each window exactly in the respective LFD.

If I run each of the lines without any open Google Chrome window, everything works perfectly. The window is in the right place at the right size.

Now if I run each of the lines in sequence without closing the Google Chrome window (even though the purpose is that I need the 8 windows open) all the windows open in the position of the first opened window, WHAT POSSESS IT IS
 If I opened it first to position 5 for example all the others will fall into that position. It is as if Google Chrome assumed the parameters of the first execution of the command line and did not change in the others although they were totally different.

I tried to do another test. I created 8 profiles in Google Chrome and ran each row with a different profile. And the same thing happened.

I do not understand what happens if I run the line from position 8n it works, it opens the window in size in monitor 8, I close the window and I run the command line referring to position 2, it works perfectly the window opens in the correct position again.

Now if I do not close the window and run any one of the lines it always opens in the position of the first opened window.

Thanks in advance for your help.
Hugs.

Everton



PhistucK

unread,
Apr 30, 2018, 3:09:59 AM4/30/18
to eve...@linuxservice.com.br, Chromium-discuss
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.


PhistucK


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Torne (Richard Coles)

unread,
Apr 30, 2018, 3:14:58 PM4/30/18
to eve...@linuxservice.com.br, Chromium-discuss
Almost all command line flags only apply when Chrome is initially launched. When it's already running, the URL you give is just passed to the already-running instance and only a few command line flags are passed on - the rest are assumed to control global behaviour of the process and are only read at startup time.

It would be good to have the window positioning flags work for opening new tabs, but this isn't implemented right now and is probably low priority (this is not something the vast majority of users are even aware exists). A patch to implement it would probably be accepted :)

--

Giovanni Lovato

unread,
Jul 29, 2018, 4:29:53 AM7/29/18
to Chromium-discuss
I am in the same exact situation: I have a video wall (Matrox Mura) and I need to launch multiple "standalone" instances of Chrome.exe but at every launch each gets "attached" to the first that was started.
This is not just for window position, it's more of having a flag that will launch a new set of processes, independent from other that may be already running. Is there a flag for that?

PhistucK

unread,
Jul 29, 2018, 4:48:40 AM7/29/18
to her...@aldu.net, Chromium-discuss
In order to run multiple separate Chrome browser processes, each of them needs its own profile.
You can specify --user-data-dir="path/to/profile/#" (change # to a different number or use an entirely different path) when you run each browser instance.
Note - the path does not have to exist, it only has to be legal (and Chrome should have permissions to create it in case it does not exist). Chrome will create profile paths that do not exist yet.

PhistucK


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

Reply all
Reply to author
Forward
0 new messages