This question already has an answer here:

how to run this python script in Raspberry pi 3 on startup?

import webbrowser


or any solution play this video in Raspberry pi 3 at bootup

i need urgent solution regarding this task i will be very thankful

marked as duplicate by Ghanima Mar 8 at 16:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You could use a crontab to run a python file you have saved. This simple crontab editor tool is quite useful for crontabs.

To see your current tasks scheduled by cron and to create new ones use the command crontab -e. Then if you wanted it to run on boot then you could put something like @reboot sudo python /home/pi/path/to/file.py at the bottom, save it and reboot.

If you run into any issues whilst trying this you can use grep cron /var/log/syslog to check the logs for cron on boot.

Hope this helps.

  • 3
    You can't start GUI programs from crontab. So this answer won't work. – Dougie Mar 9 at 0:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.