I'm trying to get a .sh script to run on system start-up. I've tried it several ways that don't work. The closest I got was using adding a line to
sh /home/pi/Desktop/run.sh &
This little script just starts up feh with a few parameters and restarts feh in case it crashes (which it does all the time but that's another issue).
The above runs
run.sh but only under root and in the background. I can see that in the task manager.
What do I need to do to run run.sh under the pi user account and in the foreground? I'm puzzled.