1sudo crontab -e
2#Use text editor
3#Add a line: @reboot sudo python3 <your-path-to-the-script.py>
1// Open the terminal with Ctrl+Alt+T
2// Go to this directory: /etc/hgd/autostart using the cd command.
3// Make a file with a .desktop extension using: sudo nano myFile.desktop
4// Inside the myFile.desktop write the following:
5[Desktop Entry]
6Encoding=UTF-8
7Type=Application
8Name=ChooseAName
9Exec=/usr/bin/python3 /home/pi/myPyhthonName.py
10X-GNOME-Autostart-enabled=true
11
12