I know that Chromium can be started in kiosk mode with the flag --kiosk in the terminal. However, when Chromium is begun, it is in a regular windowed mode. Kiosk mode isn't enabled until the user presses F11 or fullscreens the window another way. How can Chrome automatically be fullscreened and in kiosk mode after the command is executed in the terminal?
1 Answer
What you want is to programmatically press F11, and that's possible with xdotool
: it can emulate key-presses and do many other things too.
The solution is to create a shell script (or just one-liner), which runs chromium in background, sleeps a few seconds and then virtually presses F11:
chromium-browser --kiosk & sleep 5; xdotool key F11
That can also be done as a multi-liner (save this, for example, as chromium-kiosk.sh
):
chromium-browser --kiosk &
sleep 5
xdotool key F11
Reference
-
1
chromium-browser --kiosk; sleep 5; xdotool key F11
.&
afterchromium-browser --kiosk
so it runs on background, and then it should work. You'd also try the actual suggestion of the answer I linked:chromium-browser --start-maximized &; sleep 5; xdotool key F11
.