balena-io-experimental / browser

A drop-in web browser block
98 stars 76 forks source link

Chrome doesn't use the full screen width #53

Closed mbertheau closed 3 years ago

mbertheau commented 3 years ago

Similar to what's mentioned in the readme https://github.com/balenablocks/browser/tree/4676a0230886b68afd613992a2039ee141423dc6#partial-display-output I'm experiencing chrome not using the whole screen. I noticed the following in the log:

30.03.21 19:00:26 (+0800)  kiosk  Running balena base image entrypoint...
30.03.21 19:00:27 (+0800)  kiosk  setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
30.03.21 19:00:27 (+0800)  kiosk  Using default chromium flags
30.03.21 19:00:27 (+0800)  kiosk  Enabling GPU acceleration
30.03.21 19:00:27 (+0800)  kiosk  Adding user settings directory
30.03.21 19:00:27 (+0800)  kiosk  Custom window size set to 
30.03.21 19:00:27 (+0800)  kiosk  Enabling kiosk mode
30.03.21 19:00:27 (+0800)  kiosk  Enabling cursor

Note the "Custom window size set to". This indicates that in the following code

https://github.com/balenablocks/browser/blob/4676a0230886b68afd613992a2039ee141423dc6/start.sh#L86-L93

the if doesn't take the right branch, even though I haven't configured a device service variable WINDOW_SIZE.

I'm hesitant to conclude that the particular if syntax doesn't do what it's supposed to do, given that it's used in that form in so many other places in https://github.com/balenablocks/browser/blob/4676a0230886b68afd613992a2039ee141423dc6/start.sh .

I observed that there's a device variable by the name WINDOW_SIZE in the balena dashboard. Maybe that interferes?

phil-d-wilson commented 3 years ago

Hi there @mbertheau - we finally merged version 2 of the block today. I've tested the window size configuration, so hopefully moving to this version will solve your problem. :)

phil-d-wilson commented 3 years ago

I'll close this issue for now - but feel free to re-open if this is still problematic.