browser icon indicating copy to clipboard operation
browser copied to clipboard

Multiscreen Browser

Open jdbelo opened this issue 3 years ago • 10 comments

Hi everyone,

Does anyone know if it is possible to launch multiple instances of the browser block? I mean, my ultimate goal is to use a single device with two screens attached to launch two different URLs (each screen displays a different URL).

Many Thanks

jdbelo avatar Jun 01 '21 00:06 jdbelo

This wold be interesting :)

ngmartins avatar Jun 07 '21 15:06 ngmartins

Hey there.

I think to achieve this, you will need to add two instances of the block to your docker-compose, and configure them to use separate X11 displays. The blocks will have the same image, so won't take up much space on the device, or have to be downloaded twice. However, the block has a whole X11 stack as well as chromium, so that will take quite a lot of memory to run. Chromium works by grabbing as much memory as it wants in order to display pages quickly, and only release some when another process requests memory. There's a chance you'll see the two Chromium processes competing for the device resources.

There is also another issue, in that we currently default the display number to 0: https://github.com/balenablocks/browser/blob/ba2261c2454a8bab28b2838b6e137a18ef0dd18d/src/start.sh#L51 This will need to be turned into a variable, passed in from the enVars, so that users can choose the display the block uses.

If someone could PR the change, it would be super helpful. :)

phil-d-wilson avatar Jun 28 '21 09:06 phil-d-wilson

@phil-d-wilson I tried changing DISPLAY=:1 (1 instead of 0) but it does not have any impact. I am using a Raspberry Pi 4 with two display connected on HDMI0 and HDMI1. Do you maybe have another idea?

terehov avatar Dec 15 '21 12:12 terehov

Has anyone gotten this to work? I'm also interested in using multiple displays.

matt-veit avatar May 12 '22 16:05 matt-veit