Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chromium kiosk mode : Fullscreen and remove address bar

I am trying to run chromium browser in kiosk mode in raspberry pi 3(Official Jessie ).

Here is i've added in my autostart file

@point-rpi
@xset s noblank
@xset s off
@xset -dpms

@chromium-browser --kisok www.fb.com

This works fine but some problem occured.

Browser is not opened in full window also the address bar is still present in chromium

So how can i remove above two items

like image 566
Jabaa Avatar asked Feb 28 '17 08:02

Jabaa


People also ask

How do I get chromium out of kiosk mode?

How to exit Kiosk mode. The Raspberry Pi PIXEL Desktop allows you to press the Windows key on your keyboard to open their menu. You can then navigate the menu to Accessories > Terminal. Once in the terminal type sudo killall chromium-browser or just press Alt+F4 to close Chromium.

What is Kiosk mode chromium?

Kiosk mode is a session that runs a single Chrome/Android app. It does not have any real google account, it is persistent (data will be persisted between kiosk sessions) by default. Multiple kiosk apps are allowed per device, and they can be launched from system shelf on the login screen.

How do I make Chromium browser full screen?

Full-screen mode: @chromium-browser --start-fullscreen . The browser starts in app. mode but expanded to full-screen. You can press the F11 key to break out of full-screen mode.


2 Answers

For full kiosk mode, you might want to hide the Chromium scrollbars, always, for a webpage. This does not disable scrolling on a touchscreen. It just disables the scrollbars.

Using the --enable-features flag with chromium-browser did the trick for me.

--enable-features=OverlayScrollbar,OverlayScrollbarFlashAfterAnyScrollUpdate,OverlayScrollbarFlashWhenMouseEnter

And this is my full command:

    /usr/bin/chromium-browser --kiosk --noerrdialogs --enable-features=OverlayScrollbar --disable-restore-session-state http://10.10.0.16:8123

Also, to hide the mouse cursor entirely, I have changed the X command on my raspbian in /etc/lightdm/lightdm.conf from xserver-command=X to xserver-command=X -nocursor

like image 122
Tim Chaubet Avatar answered Sep 16 '22 14:09

Tim Chaubet


  1. Create a user, op in this example, for autologin at boot

    adduser op
    usermod –a –G op op
    usermod –a –G users op
    usermod –a –G audio op
    usermod –a –G video op

  2. Configure the autologin by creating the file /etc/systemd/system/[email protected]/autologin.conf with the following content

    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --autologin op --noclear %I 38400 linux

  3. Enable autologin with the following command

    systemctl enable [email protected]

  4. Impersonate the op user with the following command

    sudo su - op

  5. Insert at the end of the /home/op/.bashrc the following lines

    if [ $(tty) == "/dev/tty1" ]; then
    while true; do startx -- -nocursor; echo "Again [$?]..."; done
    fi

  6. Create the file /home/op/.xinitrc with the following content

    chromium-browser --window-size=7000,7000 --start-fullscreen --kiosk -app=http://www.fb.com/

  7. Reboot

like image 24
sKo Avatar answered Sep 17 '22 14:09

sKo