39

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.

Catalin
  • 407
  • 1
  • 4
  • 3

2 Answers2

47

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)

SK73106
  • 611
  • 5
  • 5
  • 6
    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. – Andy Anderson Dec 11 '17 at 22:57
  • 2
    I had to create the file, but this method still works in Raspbian 10 (buster) – Ben Winding Dec 18 '19 at 06: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 – Jordan Morris Nov 16 '21 at 03:19
  • I tested this on Raspberry Pi 4b using Bookworm and this does not work for me. – A.W. Nov 28 '23 at 19:58
11

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

Fabian
  • 1,260
  • 1
  • 10
  • 19
  • 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 00:50
  • Worked for me in Raspbian 10. (Raspberry PI 4) – Naveen Kumar V Jan 21 '20 at 16:07