I've had success with many ways of running a python script at boot on a Raspberry Pi (rc.local
, cronjob, etc). However, how could I have the pi boot into the text console mode (not GUI), and automatically start running a python script?
The reason for this is to have a python script that runs indefinitely and accepts text input; however, the pi will be running headless (just a keyboard attached, no mouse or monitor). I wish to boot into the text console and run from there so that there is no worries of the correct terminal not being active, etc.
Just putting the command in rc.local
resulted in the modules for the python script not being found (But the script runs fine if I manually run it after boot is completed).
sudo pip ...
orsudo pip3 ...
and they're available for all users.rc.local
is fully supported on DebIan systems with systemd.