Auto run Python script on boot (Jetson Nano 2GB)

Hi all, I am using the Jetson nano 2gb Developer Kit. I currently have a Python script which I run through Visual Studio code ide which uses two Zed stereo cameras to detect some aruco markers - hence I am using opencv. The code runs successfully through VS code but I now want to run this code automatically when I connect the Nano to the power source - eliminating the need for peripherals (keyboard, mouse, monitor).

I have come across a couple of suggestions and tried the following using a simple hello world script I created.
In /home/user/.config I created a autostart folder and in there I made a new script called myscript.desktop using Text Editor:

[Desktop Entry]
Exec=python3 /home/user/Documents/PythonCode/


When I reboot nothing seems to happen. There is the possibility that my python script ran but I can’t check because the terminal isn’t open.

The other man suggestion I saw was using systemd commands as follows: Jetson nano auto run python code when power up

I am stuck on step 1. as I don’t know what commands to write in order to run my python script in the file.

Any help/guidance on getting my python script to run on boot is welcome, thank you in advance!

You can have your python script to create an file to check if it was run or not.