I need to run a python script when Rpi is turn on, I was using a python virtual environment so I was created a script for the autorun and added on the .bashrc, but the script only starts when connecting a GUI or start new SSH session, it won’t automatically start in headless mode.
Model: Raspberry Pi B
OS: Raspbian Strech
bash script :
found the solution, my goal is to run a python script that uses a virtual environment, so first wrote a bash script to automate the virtual environment setup then added bash script on them .bashrc
but the script won’t run until I open the terminal (IDK why), and my application must need to work on the headless environment, so I disabled the GUI and enabled the autologin in the terminal via