Chromium kiosk mode on raspberry pi

From the terminal (or SSH):

mkdir /home/pi/.config/autostart

Create the config file and enter the following:

nano /home/pi/.config/autostart/kiosk.desktop
[Desktop Entry]

Create the script the Pi will run at start-up:

nano /home/pi/
# Run this script in display 0 - the monitor
export DISPLAY=:0
# Hide the mouse from the display
unclutter &
# If Chrome crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
# Run Chromium and open a tab
chromium-browser --kiosk 

Make the script executable by running:

chmod +x /home/pi/

Don't forget to disable your screensaver!