29

I would like to set up a couple of Raspberry Pis to open automatically chromium or any other browser available to at start-up, and in full screen mode.

I was wondering if any of you can help me. These will be placed as some fixed stations where I load up some URLs when raspberry pi starts.

2
35

Edit this file

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

And add this:

@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://google.com/  # load chromium after boot and open the website in full screen mode

Then reboot. Chromium should automatically launch in fullscreen mode after the desktop has loaded.

Note: The default file ( /etc/xdg/lxsession/LXDE-pi/autostart ) is the global autostart and is executed each time a user logs into the desktop. In case you want to use local autostart, use /home/pi/.config/lxsession/LXDE-pi/autostart. Local autostart(s) are useful when you want to run different programs or configurations for each user.


You can also add this line if you want the mouse to disappear:

@unclutter -idle 0.1 -root

(requires sudo apt-get install unclutter)

4
  • 5
    Nicely borrowed from another post. The hash comment indicates the URL was localhost. To make Chromium launch full screen you just need to add --kiosk or use xautomation to send F11. Dec 11 '17 at 22:57
  • 2
    I had to create the file, but this method still works in Raspbian 10 (buster) Dec 18 '19 at 6:26
  • 4
    Careful : with this solution, the desktop can be disabled. To keep the desktop on background, you are probably using NOOBs, so you may need to use the LXDE-pi folder : sudo nano /etc/xdg/lxsession/LXDE-pi/autostart.
    – Jerry
    Apr 29 '20 at 10:50
  • 1
    @Jerry's comment refers to the pre-edit version of this answer, which proposed editing /home/pi/.config/lxsession/LXDE-pi/autostart. Using this path can lock you out of your OS, since if you close chromium, the OS gui will not be loaded behind it Nov 16 at 3:19
9

on chromium you can use --start-fullscreen (like F11)

2
  • 2
    When I tried this with my browser open it didn't work... After closing my browser windows, running chromium-browser --start-fullscreen opened Chromium in fullscreen mode. Running chromium-browser --start-fullscreen --kiosk hid the "Press F11 to exit fullscreen" message
    – yndolok
    Jun 14 '19 at 0:50
  • Worked for me in Raspbian 10. (Raspberry PI 4) Jan 21 '20 at 16:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.