New here and know that launching programs is a well discussed topic, but I've got a slightly different need that I think is complicating the solution.
I've got a straight forward python script that is run using an input from a USB device (Bar Code Scanner) and I'm using to actuate another device using the GPIO interface. The desired function is for this program to run in the command line (headless) once all resources are available.
I've tried several other solutions like modifying my program to run using Crontab, rc.local, and other well discussed solutions but it seems either my home directory is not yet available or the boot order means that the input device isn't available yet. None of the solutions described earlier resulted in an error message or the desired function.
Continuing to look for an answer independently, ideas or resource material would be appreciated.
.bashrc
actually does is run the script when an interactive shell is started (every time). If you are using autologin, that may happen shortly after boot. As others have commented, this is a bad way to go. The correct way to do this would be to either find out what boot service targets you need to use as a dependency, or use a manual loop with a sufficient sleep to wait for them -- in which case the methods you've rejected would be fine. – goldilocks Aug 13 '18 at 16:08