Please provide assistance to auto-start a Deepstream analytics application automatically at startup. Currently, the application runs perfectly while running using a terminal command or shell script. But, when the application is initiated as a startup application the analytics functionality stops functioning.
Most applications which use the GPU require an X11 “
DISPLAY” context. The environment variable points at a GPU framebuffer owned by the X server…it isn’t just for graphics, although normally it is. I suspect in cases where you can run the application that if you run the command “
echo $DISPLAY”, then it will give an answer. When you start automatically there is no such environment variable unless it starts within a GUI application. If you go to a terminal where it is possible to launch your application, then what do you see from “
Security requires the user of the terminal with the “
DISPLAY” to also be the one logged in to the GUI. To test if your application requires an X environment you can take a running Jetson and use CTRL-ALT-F3 to get to a pure text terminal and log in to that. If you run command “
echo $DISPLAY” and nothing shows up, then you are in a purely text terminal. Try running your application, and should it then fail, then you know it requires the X context as specified by the “
DISPLAY” environment variable. Or you can use
ssh to log in to the Jetson, but do not use any “forwarding” options, e.g., no “
-X” or “
-Y”…this won’t have a “
DISPLAY” environment variable, and if the application does not run, then this also means you need the X environment.
If you need the X environment, then it means your automatic launch needs to be sure there is such an environment running prior to launching your app, and the “
DISPLAY” environment variable must be set up for that environment. Additionally, the app must be run as the user owning that environment.
If you run a virtual desktop the end application won’t know and won’t care that it isn’t a “real” desktop pointed at a real monitor. It is possible to manually start an X session with a given “
DISPLAY”, e.g., via “
startx”, or by setting up a virtual desktop. The virtual desktop can run without a real monitor, and remote computers can attach and detach to that desktop as well, so it has some advantages.
I can’t recommend a particular virtual desktop, but if you find this is what you need, then others can comment on what works on the Jetson. Some typical virtual desktops are TurboVNC, VirtualGL, or any VNC application.
you may customize this,
by adding your commands/scripts to call your application after system start-up.