cedd
Posts: 2
Joined: Mon Nov 25, 2019 10:40 am

Opening multiple Chromium instances (not tabs) on startup

Mon Nov 25, 2019 10:57 am

Hi Everyone!
Brief description of my setup first;
I have 3 Arduinos, all with ethernet shields. They're reading a number of serial inputs, then hosting the readings in an html page on a LAN. This works nicely. Each Arduino has an ip address. I can view each arduino's page.

I have a pi which i'm wanting to configure as a display screen for these three html pages - showing all 3 pages simultaneously one above the other. I've managed (through a lot of forum searching - i'm a pi noob but am ok with Arduino) to get the pi configured with the screen as portrait (so the 3 browsers can display one below the other), with a physical power button, with sleep/screensaver etc turned off.

I've also managed to get the pi to launch the browser on startup, with a fixed size and in a fixed position on screen by placing the following in nano /home/pi/.config/lxsession/LXDE-pi/autostart;

Code: Select all

@chromium-browser --disable-infobars --window-position=0,0 --window-size=900,600 2.2.2.31 #ip address#

This works, however i'd hoped that by doing the following i'd just get 3 instances of the browser one above the other;

Code: Select all

@chromium-browser --disable-infobars --window-position=0,0 --window-size=900,600 2.2.2.31 #ip address#
@chromium-browser --disable-infobars --window-position=0,700 --window-size=900,600 2.2.2.32 #ip address#
@chromium-browser --disable-infobars --window-position=0,1400 --window-size=900,600 2.2.2.33 #ip address#

Instead I get one instance of the browser with 3 tabs open. This isn't what I want! I want to be able to see all 3 pages at once, hence the need for 3 instances of the browser. I know I can click on the tab and drag it out of the browser window to make a new instance, but the aim is for this screen to be a pure display - no mouse or keyboard attached.

Does anybody have a clue how to make this work? In an ideal world i'd also be able to open each instance without the address and tool bar (basically kiosk mode but with a fixed size and position - not full screen) but I don't think this is possible (that's what I was hoping disable-infobars would do).

User avatar
neilgl
Posts: 4688
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Opening multiple Chromium instances (not tabs) on startup

Mon Nov 25, 2019 2:17 pm

I would use one html page on the pi containing 3 iframes that load the three arduino pages.

User avatar
Botspot
Posts: 1826
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Opening multiple Chromium instances (not tabs) on startup

Mon Nov 25, 2019 2:30 pm

Here's a list of all chromium command line arguments:https://peter.sh/experiments/chromium-c ... -switches/.
Just add

Code: Select all

--new-window
to your second two chromium commands.
Easily install anything on your Pi using Pi-Apps. Over 2 million users.
Over 200 apps including image editors, IDEs, games, web browsers, appearance themes, and more to upgrade your Raspberry Pi desktop.
More info: https://github.com/Botspot/pi-apps

cedd
Posts: 2
Joined: Mon Nov 25, 2019 10:40 am

Re: Opening multiple Chromium instances (not tabs) on startup

Mon Nov 25, 2019 3:07 pm

While I was busy waiting for this post to be approved and writing this reply, a few of you have commented. Thank you. My own solution listed below;
I found the chromium google user group and found a few answers there.
I was on the right track, but there were a few quirks. Chromium has an app mode. If you type "--app=" before the url it opens with a much less intrusive toolbar.
Once you're doing app mode it opens up 3 separate windows, but all on top of each other. This positioning was because of a quirk with Chromium that means the sizing and position is overridden by any currently open instances of Chromium (so by the time I was opening instances 2 and 3, instance 1 was open and dictating the location and size). The way around this is to set up a user data file per instance of the browser. This allows all 3 to open in different locations.

The above was all achieved using command line arguments as below;

Code: Select all

@chromium-browser --disable-infobars --window-position=0,0 --window-size=900,440 --app=http://*address1* --user-data-dir="/home/pi/Documents/Profiles/1
@chromium-browser --disable-infobars --window-position=0,500 --window-size=900,440 --app=http://*address2* --user-data-dir="/home/pi/Documents/Profiles/2
@chromium-browser --disable-infobars --window-position=0,1000 --window-size=900,440 --app=http://*address3* --user-data-dir="/home/pi/Documents/Profiles/3
Just seen your response Botspot, thank you. Looks like that would have solved the positioning issue. I just got lucky with the above and it also solved my view issue. Thanks for your time.

Return to “Beginners”