# Automatic Execution of Python Script upon PYNQ bootup

**URL:** <https://discuss.pynq.io/t/automatic-execution-of-python-script-upon-pynq-bootup/1948>\
**Category:** Support\
**Created:** [October 27, 2020, 4:54pm UTC](https://discuss.pynq.io/t/automatic-execution-of-python-script-upon-pynq-bootup/1948 "2020-10-27T16:54:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pamudji](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@pamudji](https://discuss.pynq.io/u/pamudji)\
**Post date:** [October 27, 2020, 4:54pm UTC](https://discuss.pynq.io/t/automatic-execution-of-python-script-upon-pynq-bootup/1948/1 "2020-10-27T16:54:44Z")

</div>

Hi,  
Upon power up, I noticed that PYNQ can automatically login user xilinx.  
Now I want to continue with executing Python script thereafter.  
How can I do it in PYNQ environment ?  
Thank you.

Best regards,  
Djony Pamudji

---

<div class="post-metadata">

**Author:** ![cathalmccabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cathalmccabe/32/3348_2.png) [@cathalmccabe](https://discuss.pynq.io/u/cathalmccabe)\
**Post date:** [October 28, 2020, 8:44am UTC](https://discuss.pynq.io/t/automatic-execution-of-python-script-upon-pynq-bootup/1948/2 "2020-10-28T08:44:57Z")

</div>

This isn’t specific to PYNQ. The PYNQ image is based on Ubuntu.  
You can web search for solutions on how to do this on Ubuntu. e.g. this should work:  
[https://websofttechs.com/tutorials/how-to-setup-python-script-autorun-in-ubuntu-18-04/](https://websofttechs.com/tutorials/how-to-setup-python-script-autorun-in-ubuntu-18-04/)

For reference, if you want to do this at boot:

> [@Starting PYNQ Programs At Boot](https://discuss.pynq.io/t/starting-pynq-programs-at-boot/1305/3):
>
> Peter, This just what I need if I can get it to work. I am trying to run an Intel NCS 2 inside a Jupyter notebook and I need to configure the environment before Jupyter starts. I tried adding a service before the jupyter.service starts. [Unit] Description=OpenVino config Before=jupyter.service [Service] Type=oneshot ExecStart=/opt/intel/openvino/bin/setupvars.sh [Install] WantedBy=basic.target I can see the service runs before jupyter.service but I don’t see any effect. [image] I …

Cathal
