How to make our own program run at the moment tx2 boots up?

Hello,everyone. Now I have one problem and I need your help.
I need to make my own program run at the moment tx2 boots up and I have no idea how to do. Can someone help me solve this problem?

It depends on the program’s dependencies. If you don’t need a logged in user, and don’t need an associated X session (most CUDA programs need this), then you can usually add it to the end of “/etc/rc.local”.

In many cases where you need an X session without a physical display and without a user sitting at the unit, then you’d want to install a virtual X server, and then a program needing this (such as CUDA) can be associated with this virtual server.

FYI, X is not the desktop GUI you see. X is an interface to a buffer which happens to match what GPUs understand, and which a video monitor can display. X runs another program, and for the case which people are most familiar with, that would either be the display manager (for login), or the window manager (the windowing desktop environment). The NVIDIA GPU driver is loaded into the X server, and so unless you have a special case you need the server. The GPU driver does not care if the server talks to a video monitor or if it is purely virtual and just an organized buffer.

So you probably cannot get a good answer without knowing a lot more detail. Example, is it CUDA? Can it run upon login (auto login might be simple if there is a monitor attached…no virtual server would be needed)? Will you have a monitor attached? Does the program need to run even without a logged in user?