DevMiser / DaVinci

DaVinci - The ChatGPT AI Virtual Assistant
172 stars 21 forks source link

Question about start-up #5

Open ProfileNameIsOk opened 1 year ago

ProfileNameIsOk commented 1 year ago

I was wondering if there was a good method to run the command /home/pi/DaVinci/DaVinci.py on startup. i tried using the command:

sudo chrontab -e

this was so I could go to the bottom of the file to add "@reboot python3 /home/pi/DaVinci/DaVinci.py &" so that it can run on startup. However upon rebooting the file nothing happens and I have to start the python script manually. Is there a good method to start the script automatically upon booting the pi?

DevMiser commented 1 year ago

Here is a suggested way to do so from another user: Modify the .bashrc file so that it will handle the audio startup correctly. sudo nano /home/pi/.bashrc, and add python3 /home/pi/DaVinci/[DaVinci.py] to the end of the .bashrc file, save, exit and also go into raspi-config and change the boot option, select automatic login, so that it will be logged in as the pi user. Now it boots up and starts DaVinci.py as you would from the command line with no issues.