Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8093

Beginners • Chromium kiosk always starting on half screen (Ubuntu Server)

$
0
0
I deployed my Laravel app on my Raspberry Pi 4 running on Ubuntu Server (headless). and I am starting it as kiosk using chromium kiosk mode. unfortunately it's running on half screen. do you guys have any idea on how to fix that? here's my shell script.

GNU nano 8.4 /usr/local/bin/start-kiosk.sh #!/bin/bash

# Wait a bit for X to initialize
sleep 2

# Get actual display dimensions from X server
RESOLUTION=$(xdpyinfo | awk '/dimensions:/ {print $2}')
WIDTH=$(echo $RESOLUTION | cut -d'x' -f1)
HEIGHT=$(echo $RESOLUTION | cut -d'x' -f2)

echo "Detected resolution: ${WIDTH}x${HEIGHT}"

# Disable screen blanking and power management
xset -dpms
xset s off
xset s noblank

# Hide mouse cursor after a few seconds of inactivity
unclutter -idle 0.5 -root &

# Run Chromium in full kiosk mode
chromium-browser \
--noerrdialogs \
--disable-infobars \
--disable-session-crashed-bubble \
--disable-features=TranslateUI \
--start-fullscreen \
--kiosk \
--window-position=0,0 \
--window-size=${WIDTH},${HEIGHT} \
--no-first-run \
--fast --fast-start \
--password-store=basic \
--disk-cache-dir=/dev/null \
--app="http://192.168.1.149"

# Keep Chromium running (optional watchdog)
while true; do
sleep 5
if ! pgrep chromium > /dev/null; then
exec "$0"
fi
done

Image

Statistics: Posted by bryanjames — Wed Nov 05, 2025 4:01 pm



Viewing all articles
Browse latest Browse all 8093

Trending Articles