40

I'd like to put my Raspberry Pi into a kiosk mode with Chromium directed to my website but I can't seem to figure out how to get it to work. I've been following a few different guides, and the code they have given me has all been slightly different so I'm not sure what exactly to follow.

So far I've tried a few different variations of changing the code in

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

with this:

#@xscreensaver -no-splash
@xset s off
@xset -dpms
@xset s noblank
@chromium --noerrdialogs --kiosk http://localhost --incognito

I also put the same code in

/etc/xdg/lxsession/LXDE/autostart

It still boots to just the desktop and I'm at a loss of what to do, as there doesn't seem to be very many tutorials discussing this and none that are recent.

Aurora0001
  • 6,357
  • 3
  • 25
  • 39
DavidK
  • 503
  • 1
  • 5
  • 7

2 Answers2

48

I have a Raspberry Pi 2 running Raspbian Jessie with Chromium 45 installed. I found that you need to copy the existing autostart file to your local:

mkdir -p /home/pi/.config/lxsession/LXDE-pi/
cp /etc/xdg/lxsession/LXDE-pi/autostart /home/pi/.config/lxsession/LXDE-pi/autostart

So edit this local version:

nano /home/pi/.config/lxsession/LXDE-pi/autostart

#@xscreensaver -no-splash  # comment this line out to disable screensaver
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --incognito --kiosk http://localhost/  # load chromium after boot and point to the localhost webserver in full screen mode

Save

sudo reboot
Roger Lipscombe
  • 163
  • 2
  • 13
Justin N
  • 496
  • 5
  • 2
6

By default the Pi the auto-logon X environment is done with credentials of the pi user. The config setting's of the Xserver environment of this user is in /home/pi/.config/lxsession/LXDE-pi/autostart, NOT in /etc/xdg/lxsession/LXDE-pi/autostart (this is the environment for the root user).

techraf
  • 4,353
  • 10
  • 32
  • 43
kamiel
  • 61
  • 1
  • 1