21

I'm trying to boot a chrome application shortcut in full screen (kiosk mode).

Launching as an application shortcut is straightforward by appending the command --app=http://website.com. But the kiosk/fullscreen mode --kiosk or --start-maximized doesn't work.

I've looked up the commands through man google-chrome. I doesn't look like the option exists.

Is this option hidden, or are there alternatives? A way of starting chrome in fullscreen by default? I'm guessing that there is a way to fake a key press on F11 after chrome has started. Though this really isn't an ideal solution.

4
  • Have you tried google-chrome --help?
    – MadMike
    Commented Oct 14, 2013 at 14:17
  • 1
    yes, its the same command as 'man google-chrome'
    – rom
    Commented Oct 14, 2013 at 17:03
  • 2
    I guess it's a matter of the version in use because google-chrome --start-maximized --app=http://website.com works for me. Commented Feb 21, 2019 at 14:14
  • Many of the options below will work, however, you need to make sure chrome isn't running already!
    – gkhaos
    Commented Jun 29, 2021 at 14:20

5 Answers 5

33

How to use Chrome browser in kiosk-mode

Use it like this:

google-chrome --kiosk http://example.com
chromium-browser --kiosk http://example.com

tested with Ubuntu 12.04, google-chrome-stable 30.0.1599.66-1 and chromium-browser 28.0.1500.71-0ubuntu1.12.04. But only if there is no other instance of the browser running.

So close all browser windows and then use it with the option and it should definitely work as expected.

Other things I've learned

Checking --help or man google-chrome didn't help because:

Chromium has hundreds of undocumented command-line flags that are added
and removed at the whim of the developers.   Here,  we  document  rela‐
tively stable flags.

So --kiosk is an option that is deliberately un-document, because it might disappear at a whim... which it didn't since over 2 years. But, well you have been warned.

2
  • Nice one, works fine on 13.04 (though I am running legacy fullscreen support). I take it my issue was that I already had a chrome instance running. Was hoping there was a kiosk mode that would fall back to an application shortcut when exiting fullscreen. A tall order I suppose.
    – rom
    Commented Oct 15, 2013 at 9:17
  • Confirmed to work on my installation of Raspbian (Raspberry pi 2) with chromium (Full version string: "Version 22.0.1229.94 Built on Debian 7.0, running on Debian 7.8 (161065)")
    – rinogo
    Commented Feb 4, 2016 at 21:16
9

Peter Beverloo has comprised a list of command line options at http://peter.sh/experiments/chromium-command-line-switches/

8

In my case only --kiosk didn't help that much because I wanted to run in app mode (--app=URL) -- which disables some distractions like navbar or bookmarks.

I've found from Peter Beverloo's link in other answer this --start-fullscreen flag. So OP would probably go with something like

TLDR

$ google-chrome --start-fullscreen --app=http://website.com
1
  • 1
    Be aware that if your URL contains some special characters you might need to enclose them with paragraphs like "--app=http://website.com/stuff?param1=a&param2=b"
    – MadMike
    Commented Apr 5, 2019 at 7:44
1

Here is my full solution through using it in production for years. The options prevent popups that can occur and mess with your application. I will try to keep this post up to date with any changes.

Run this command as a non-root user

nohup google-chrome --kiosk --no-first-run --suppress-message-center-popups --block-new-web-contents --no-default-browser-check --password-store=basic --ignore-certificate-errors --ignore-ssl-errors --simulate-outdated-no-au='Tue, 31 Dec 2199 23:59:59 GMT' "http://localhost/pal/index.html" &

http://localhost/pal/index.html is the URL you want it to open. I have a webapp in /var/www/html/pal that is hosted locally using Apache.

I use the nohup command with an ampersand as it is run from a shell script on boot then exits. You have to run the shell script from Ubuntu's "Startup Applications" with auto-login enabled.

A complete list of flags can be found here.

0

I had problem running chromium in kios app mode too in recent rpios (not that's matter in this case what distro (image from 2023-12-11)). I didn't get window to show when I started chromium-browser from autostart script, but if I used F11 (fullscreen on/off) to toggle fullscreen then I get window to show just fine - this gave me a bit to think so I did few experiments...

I could run in kiosk mode but app mode is more desirable since it disables some annoyance like Matheus Santana mentioned in comment.

Solution

I found out that if you want to run chromium-browser in --app mode and --start-fullscreen you have to also add --start-maximized option to command line too.

Here is command what I use for my kiosk-mode, maybe someone find it useful or inspiring :) :

chromium-browser --incognito --start-fullscreen --start-maximized --kiosk --noerrdialogs --disable-default-apps --disable-single-click-autofill --disable-translate-new-ux --disable-translate --disable-cache --disk-cache-dir=/dev/null --disk-cache-size=1 --reduce-security-for-testing --app=http://<app-url>/

My chromium version as per 2024-01-02:

pi@raspberrypi:~ $ chromium-browser --version
Chromium 119.0.6045.171 Built on Debian , running on Debian 12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .