I have a simple gstreamer C++ application called "preview.out" that displays a camera preview on HDMI display.
This application works just fine when I log in as root and launch it by doing ./preview.out.
I would like to launch this same app on power up (without manually logging in as root).
I have a service installed that calls "launchapp.sh" on power up and I have:
This does seem to launch the app but nothing shows on the display.
I suspect it has something to do with users privileges or something.
if I do:
root@imx8mm:~# journalctl -u startup.service --no-pager
-- Logs begin at Fri 2020-01-17 21:05:48 UTC, end at Sun 2020-02-23 12:19:39 UT>
Feb 23 12:16:00 imx8mm systemd: Started start preview application.
Feb 23 12:16:01 imx8mm bash: error: XDG_RUNTIME_DIR not set in the environment.
Feb 23 12:16:01 imx8mm bash: Unable to set the source pipeline to the playing state.
I changed the launchapp.sh adding:
Which got rid of the XDG error but I still get the "...pipeline to the playing state" error.
I use V4L2 as the source in the pipeline.
How can I launch so display shows on the monitor?