Sorry to bump this old thread, but without it I would not have been able to resolve the strange issue/s I was having.
So I thought I should post what the problem was and how this thread helped me, in case anyone comes here looking for the same solution.
So issues I was having.
Odroid C2, with a 7 inch HDMI touch screen, at 1024 x 600
trying to load Chromium into Kiosk mode & full screen.
I could get Chromium to load, after setting the Display options correctly for the HDMI resolution correctly.
But for some reason it didn’t seem like it was Grep’ing the resolution correctly and I was getting the “restore pages” bubble and couldn’t get across the screen to close it.
Also, the Webserver that I am running on that machine takes a few minutes to come up properly. (www.openhab.org if anyone is interested)
So I pasted in the configuration extras above and manually set the X & Y values, as well as adding in a 3 minute sleep period.
It’s all working really well and the real joy is that I can still use the dietpi-autostart >> Chromium Kiosk (11) option to adjust the start page
For reference, here is the edited chromium-autostart.sh contents
#!/bin/bash
# Autostart run script for Kiosk mode, based on @AYapejian https://github.com/MichaIng/DietPi/issues/1737#issue-318697621
# - Please see /root/.chromium-browser.init (and /etc/chromium.d/custom_flags) for additional egl/gl init options
## Sleep this script to allow for openHAB2 to fully load
## Sleep 3 minutes
sleep 3m
# Command line switches https://peter.sh/experiments/chromium-command-line-switches/
# --test-type gets rid of some of the chromium warnings that you may or may not care about in kiosk on a LAN
# --pull-to-refresh=1
# --ash-host-window-bounds="400,300"
# - Resolution to use for kiosk mode, should ideally match current system resolution
## Commented out because it just wasn't grabbing the screen size correctly
# RES_X=$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_RES_X=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
# RES_Y=$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
## Manually set window / screen size
RES_X=1024
RES_Y=600
## Added following to remove "Restore Bubble"
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
CHROMIUM_OPTS="--kiosk --test-type --window-size=$RES_X,$RES_Y --start-fullscreen --start-maximized --window-position=0,0"
# - If you want tablet mode, uncomment the next line.
#CHROMIUM_OPTS+=' --force-tablet-mode --tablet-ui'
# - Add URL for first run:
URL=$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
CHROMIUM_OPTS+=" --homepage $URL"
# Find absolute filepath location of Chromium binary.
FP_CHROMIUM=$(command -v chromium)
if [[ ! $FP_CHROMIUM ]]; then
# - Assume RPi
FP_CHROMIUM="$(command -v chromium-browser)"
fi
xinit $FP_CHROMIUM $CHROMIUM_OPTS
Update
I have found out why the X screen for Chromium was being set incorrectly.
The entry at the bottom of
/DietPi/dietpi.txt
was set to something like 1280 whereas the 7 inch screen is 1024 x 600
I couldn’t find anyway in the menus to adjust this, so I edited it in nano.
Next step
So the next things is to work out how to get the 7 inch HDMI touch screen running Chromium in Kiosk mode and the SPI / LCD screen to run a terminal