Run Script on Startup

I have a script, that plays a video via gstreamer on loop. I am wanting to play this script on startup of the Jetson, after login, without the GUI. I have done this using bash_completion.sh in the past but have had problems and was told previously to not use bash_completion to accomplish this goal. What is the definitive best way to do this? In the past, when I used bash_completion, it would play my video then go to sleep after a while, another reason I did not want to use this method either.

For a GUI app, here you go:
https://help.ubuntu.com/stable/ubuntu-help/startup-applications.html.en

You will probably have to edit the power options in “Settings” if you want the screen to not turn off, if your app doesn’t force this.

you may also like to check a reference thread at unix.StackExchange

.xinitrc is another way to do it, yeah, and might even be a better option.

Alternatively, you could use a gstreamer sink that doesn’t require X like “nveglglessink”.