Shell Script - this is located in the folder /home/pi/.config/autostart/scratchauto.sh. I want the script to run once the raspbian GUI boots.
Code: Select all
cd /home/pi/scratchgpio5
sudo python scratchgpio_handler5.py &
scratch presentation "/home/pi/scratchgpio5/scratchApp.sb"
Method 1 - crontab
Code: Select all
@reboot sh /home/pi/.config/autostart/scratchauto.sh >home/pi/logs/cronlog 2>&1Method 2 - etc/rc.local
My first attempt at getting it to run by adding a command to the etc/rc.local file
Code: Select all
sudo /home/pi/.config/autostart/scratchauto.sh
Code: Select all
su - pi -c " /home/pi/.config/autostart/scratchauto.sh"