On older release of OS I simply run commandadd aditional line And that's it, main.py was started after reboot
With Bookworm OS I have to do three steps
Line 1: moove to folder Project
Line 2: activation of the virtual environment
Line 3: start of the script main.pyWhen done it manual, it works normally. The question is how to do it to start script automaticaly after reboot?
I did try like below, but no luck.
Any help would be appreciated.
Line 4: activation of the virtual environment
Line 5: start of the script main.py
Code:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Code:
@lxterminal -e python3 /home/vlado/Project/main.py
With Bookworm OS I have to do three steps
Line 1: moove to folder Project
Line 2: activation of the virtual environment
Line 3: start of the script main.py
Code:
vlado@raspberry:~ $ cd Projectvlado@raspberry:~/Project $ source env/bin/activate(env) vlado@raspberry:~/Project $ python main.py
I did try like below, but no luck.
Any help would be appreciated.
Code:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Line 5: start of the script main.py
Code:
@lxpanel --profile LXDE-pi@pcmanfm --desktop --profile LXDE-pi@xscreensaver -no-splash@lxterminal -e python3 /home/vlado/Project/source env/bin/activate@lxterminal -e python3 /(env)home/vlado/Project/python main.py
Statistics: Posted by California — Tue Jan 30, 2024 5:34 am