I solved by doing like so:
Create the folder /home/username/.config/autostart
Right Click on desktop and select "Create Launcher"
Fill the fields, in "Execute" put the command (ex. pyhton3 path/to/file.py), in "Working Directory" put the folder where the
file.py is stored (ex. path/to), check "run in terminal"
drag and drop the file you created in the autostart folder created in the beginning
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…