Reputation: 293
I'm trying to run a Flutter app in kiosk mode on a Raspberry Pi 4B, but I'm having trouble getting it to launch in full-screen mode.
I've followed the instructions from the Raspberry Pi Kiosk Mode Tutorial to set up kiosk mode, but these steps seem more geared toward running a web app or a website rather than a standalone Flutter app. Even though I tried to adapt those instructions for my Flutter app, it still doesn't open in full-screen mode.
Here are the steps I took: Installed necessary packages:
sudo apt install wtype
Configured Raspberry Pi using raspi-config to boot to the graphical interface.
Edited the wayfire.ini file to autostart my Flutter app:
sudo nano .config/wayfire.ini
Added the following lines to the [autostart] section:
[autostart]
panel = wfrespawn wf-panel-pi
background = wfrespawn pcmanfm --desktop --profile LXDE-pi
xdg-autostart = lxsession-xdg-autostart
flutterapp = /home/downloads/mydemoapp --kiosk --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized
screensaver = f
I am able to autostart my app using these steps, but it does not open in full-screen mode as I intended. Does anyone know how I can get my Flutter app to run in true kiosk mode or at least in full-screen on boot?
Upvotes: 1
Views: 417
Reputation: 1
I think those flags are intended for the Chromium browser.
particularly "--kiosk --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized"
You have to control the window state somehow in the Flutter app configuration.
Unfortunately, I might not have the answer to your problem as I shifted to using PyQt on Linux instead of Flutter.
Still, I did learn a lot from attempting to Kiosk mode my Svelte webapp, and those definitely are parameters only meant for the Chromium/chrome browser and does not apply to other GUI apps.
Most GUI frameworks have a way to minimize, maximize, or remove the title bar and exit buttons from the window. I'm sure you could create a script that will block other inputs to emulate kiosk mode on the dart backend of Flutter, but you'd have to do it from scratch, unlike the ease of use of just calling kiosk mode for Chromium.
Upvotes: 0