1

I am using a Pi 3 B+ with the Pi Foundation 7" touchscreen for a personal home automation system. The UI is a webpage displayed in a Chromium browser in kiosk mode. Here are my specifics:

/etc/X11/xinit/xserverrc:

#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@" -nocursor

/etc/X11/xorg.conf:

Section "ServerFlags"
Option "blank time" "0"
Option "standby time" "0"
Option "suspend time" "0"
Option "off time" "0"
EndSection

Startup command line:

startx /usr/bin/chromium-browser http://localhost:19532 --window-size=800,480 --start-fullscreen --kiosk --incognito --disable-pinch --overscroll-history-navigation=0 --remote-debugging-port=9222

This all has worked well for a number of months now. But for as long as I've been using this setup, the viewport seems to be shifted down and to the right by 10px relative to the top left of the actual screen. That is, if I place an 11px border around the edges of the page, I see all 11px on the top and left sides of the screen, although there are 10 black pixels. And on the bottom and right sides, I see only 1px of the border.

Does anyone know what might cause this and how I might fix it? I can always shift content on the bottom and right sides by 10px, but I'd like to fill the screen on the top and left sides, if possible.

1

This answer on Unix Stack Exchange helped me.

I needed to open ~/.config/chromium/Default/Preferences and add a window_placement key under browser containing:

"window_placement": {
    "bottom": 800,
    "docked": false,
    "left": 0,
    "maximized": true,
    "right": 480,
    "top": 0
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.