How can I make chromium run on startup using Raspberry Pi 3?
<p>I have a Raspberry Pi 3 - Model B, with Raspbian jessie operation system.
Im trying to open "chromium" on startup.</p>

<p>i wrote a simple script:</p>

<pre><code>#!/bin/bash
/usr/bin/chromium-browser --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk http://www.google.com
exit 0
</code></pre>

<p><strong>I can run the script manually and it works</strong> perfect.
I read about a lot of various ways to run this script on startup.
I have tried:
adding this line <code>@reboot path/to/my/script</code> to <code>crontab -e</code> file with no success.<br>
Also i have tried to edit <code>/etc/rc.local</code> file by adding this line: </p>

<pre><code>#!/bin/sh -e
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
  /home/pi/Desktop/script1.sh&amp;   &lt;-------- THIS LINE 
fi
exit 0
</code></pre>

<p>I have checked that the script is <strong>executable</strong> and rc.local too:</p>

<ul>
<li>rwxrwxrwx 1 pi pi script1.sh</li>
<li>rwxr-xr-x 1 root root rc.local</li>
</ul>

<p>I can see script1.sh tesk on my Task Manger (it runs as root) but nothing happen.</p>

<p>The default user is Pi and i log as a Pi user and not as root, maybe this is the problem?
Can someone explain me what is the problom and why i can see the script only in the Task Manager? what should i do ? 
TNX!</p>

<p><strong>UPDATE</strong>
i have changed the rc.local to be like:</p>

<pre><code>!/bin/sh -e
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
  su - pi -c "/usr/bin/chromium-browser --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk http://www.google.com &amp;"
fi
exit 0
</code></pre>

<p><strong>still does not work for me :|</strong> </p>