Skip to content

Instantly share code, notes, and snippets.

@rampfox
Last active November 19, 2024 17:22
Show Gist options
  • Save rampfox/085bf3ffb9ff51e114bf7afdf3ced71b to your computer and use it in GitHub Desktop.
Save rampfox/085bf3ffb9ff51e114bf7afdf3ced71b to your computer and use it in GitHub Desktop.
How to open Chromium in full screen at startup on the Raspberry Pi

(debian 10 buster)

First, it seems that ~/.config/lxsession/LXDE-pi/autostart does not exist by default.

  1. copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
  1. open the autostart with nano
nano ~/.config/lxsession/LXDE-pi/autostart
  1. Then edit the autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
point-rpi
chromium --start https://google.com/

if you want to autostart incongnito mode

@chromium-browser --incognito --start https://google.com/

chromium --incognito https://google.com/

^ + x exit and save

then sudo reboot to try on


the various other browser modes:

  • Application Mode: @chromium-browser --app. The browser starts up without displaying any toolbars.

  • 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.

  • Kiosk mode: @chromium-browser --kiosk. The browser starts in full-screen mode but does not respond to the F11 key, nor to any command to get it to switch tasks.

@bobzer
Copy link

bobzer commented Oct 14, 2023

Hi is it possible to start chromium without showing the notice about the update?

sometimes the browser displays a little popup showing the update wasn't updatet.

thanks pat

--noerrdialogs: suppresses any error messages or prompts that would normally be displayed as dialogue boxes
--disable-infobars: disables the infobars that provide information or notifications within the user interface
--no-first-run: prevents the application from displaying a first-run setup experience or any introductory prompts that would typically appear when launching the application for the first time
--ozone-platform=wayland: specifies the Ozone platform to use, specifically Wayland (Ozone is a platform abstraction layer used for creating user interfaces in certain applications)
--enable-features=OverlayScrollbar: enables scrollbars that appear only when necessary and overlay the content, rather than being constantly visible

from : https://www.raspberrypi.com/tutorials/how-to-use-a-raspberry-pi-in-kiosk-mode/

@valbuz
Copy link

valbuz commented Oct 15, 2023

thanks!

@Enkumicahel
Copy link

Many thanks

@Mtillmann
Copy link

Mtillmann commented Feb 16, 2024

from : https://www.raspberrypi.com/tutorials/how-to-use-a-raspberry-pi-in-kiosk-mode/

this is the way to go in 2024 - thanks for posting @bobzer the url does not show on google for me

@thephantom
Copy link

https://forums.raspberrypi.com/viewtopic.php?t=212015 , that is another variant

Why does did not work anymore? Pi Crashed again so i do an new setup with the latest version but the website does not start after reboot.

i tried with pi and with teh username

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart (made the dirs it with mkdir)

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@point-rpi
@xset s off
@xset -dpms
@xset s noblank
@unclutter -idle 0.1 -root
@chromium-browser --noerrdialogs --disable-session-crashed-bubble --disable-infobars --check-for-update-interval=1 --simulate-critical-update --kiosk --incognito https://wwwgoogle.com

@MS-FSTLN
Copy link

Raspbian switched to Wayland, which kind of ignores the autostart file.
You now have to add your custom lines to the [autostart] section of your wayfire file

~/.config/wayfire.ini

If the [autostart] section doesn't exist, just create it.

Mine looks like this:

[autostart]
chromium = chromium-browser https://www.google.com --kiosk --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized
screensaver = false
dpms = false

The only issue left for me is currently to disable the cursor, because unclutter won't work with Wayland (as far as I know)

@Mtillmann
Copy link

@MS-FSTLN I managed to hide the cursor by adding this CSS to the document I am displaying:

  * {
        cursor: none;
    }

If this isn't an option, you could try and install an chrome extension that applies custom styles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment