Chrome kiosk mode is not enabled until fullscreened

1

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?

Jack Guy

Posted 2013-12-31T21:38:50.747

Reputation: 167

2

As some answer on askubuntu suggests, do the following: chromium-browser --kiosk; sleep 5; xdotool key F11.

– Risto Salminen – 2013-12-31T21:50:08.050

That won't work, actually. No command after chromium-browser --kiosk is executed. – Jack Guy – 2013-12-31T22:54:26.523

1Ah, of course! I forgot that you should put & after chromium-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. – Risto Salminen – 2014-01-01T07:14:04.810

Answers

1

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

Risto Salminen

Posted 2013-12-31T21:38:50.747

Reputation: 167

1chromium-browser -kiosk --start-fullscreen – micke – 2015-02-08T16:50:27.917