running login as non-root on pi

edit the /etc/rc.local file

sudo nano /etc/rc.local

Place this line BEFORE the ‘Exit 0’ line

(sleep 8;sudo su - pi -c "/home/pi/xxxxx")&