<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic run gstreamer app on powerup in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005433#M148994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple gstreamer C++ application called "preview.out" that displays a camera preview on HDMI display.&lt;/P&gt;&lt;P&gt;This application works just fine when I log in as root and launch it by doing ./preview.out.&lt;/P&gt;&lt;P&gt;I would like to launch this same app on power up (without manually logging in as root).&lt;/P&gt;&lt;P&gt;I have a service installed that calls "launchapp.sh" on power up and I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;#!/bin/bash&lt;BR /&gt;cd /home/root&lt;BR /&gt;./preview.out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does seem to launch the app but nothing shows on the display.&lt;/P&gt;&lt;P&gt;I suspect it has something to do with users privileges or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I do:&lt;/P&gt;&lt;P&gt;root@imx8mm:~# journalctl -u startup.service --no-pager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Logs begin at Fri 2020-01-17 21:05:48 UTC, end at Sun 2020-02-23 12:19:39 UT&amp;gt;&lt;BR /&gt;Feb 23 12:16:00 imx8mm systemd[1]: Started start preview application.&lt;BR /&gt;Feb 23 12:16:01 imx8mm bash[3340]: error: XDG_RUNTIME_DIR not set in the environment.&lt;BR /&gt;Feb 23 12:16:01 imx8mm bash[3340]: Unable to set the source pipeline to the playing state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the launchapp.sh adding:&lt;/P&gt;&lt;P&gt;export XDG_RUNTIME_DIR=/home/root&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which got rid of the XDG error but I still get the "...pipeline to the playing state" error.&lt;/P&gt;&lt;P&gt;I use V4L2 as the source in the pipeline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I launch so display shows on the monitor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Feb 2020 23:25:48 GMT</pubDate>
    <dc:creator>davidvescovi</dc:creator>
    <dc:date>2020-02-22T23:25:48Z</dc:date>
    <item>
      <title>run gstreamer app on powerup</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005433#M148994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple gstreamer C++ application called "preview.out" that displays a camera preview on HDMI display.&lt;/P&gt;&lt;P&gt;This application works just fine when I log in as root and launch it by doing ./preview.out.&lt;/P&gt;&lt;P&gt;I would like to launch this same app on power up (without manually logging in as root).&lt;/P&gt;&lt;P&gt;I have a service installed that calls "launchapp.sh" on power up and I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;#!/bin/bash&lt;BR /&gt;cd /home/root&lt;BR /&gt;./preview.out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does seem to launch the app but nothing shows on the display.&lt;/P&gt;&lt;P&gt;I suspect it has something to do with users privileges or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I do:&lt;/P&gt;&lt;P&gt;root@imx8mm:~# journalctl -u startup.service --no-pager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Logs begin at Fri 2020-01-17 21:05:48 UTC, end at Sun 2020-02-23 12:19:39 UT&amp;gt;&lt;BR /&gt;Feb 23 12:16:00 imx8mm systemd[1]: Started start preview application.&lt;BR /&gt;Feb 23 12:16:01 imx8mm bash[3340]: error: XDG_RUNTIME_DIR not set in the environment.&lt;BR /&gt;Feb 23 12:16:01 imx8mm bash[3340]: Unable to set the source pipeline to the playing state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed the launchapp.sh adding:&lt;/P&gt;&lt;P&gt;export XDG_RUNTIME_DIR=/home/root&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which got rid of the XDG error but I still get the "...pipeline to the playing state" error.&lt;/P&gt;&lt;P&gt;I use V4L2 as the source in the pipeline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I launch so display shows on the monitor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2020 23:25:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005433#M148994</guid>
      <dc:creator>davidvescovi</dc:creator>
      <dc:date>2020-02-22T23:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: run gstreamer app on powerup</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005434#M148995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David Vescovi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One alternative would be adding a script that launches the app on the init.d file inside /etc/init.d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;BR /&gt; Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 18:03:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005434#M148995</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2020-03-03T18:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: run gstreamer app on powerup</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005435#M148996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;A _jive_internal="true" data-content-finding="Community" data-userid="217367" data-username="davidvescovi" href="https://community.nxp.com/people/davidvescovi"&gt;David Vescovi&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please change the path for&amp;nbsp;XDG_RUNTIME_DIR to &lt;STRONG&gt;export&lt;/STRONG&gt; &lt;STRONG&gt;XDG_RUNTIME_DIR=/run/user/0/&lt;/STRONG&gt; and&lt;/P&gt;&lt;P&gt;after that add the User=root in your &lt;STRONG&gt;.service&lt;/STRONG&gt; file under [Service] section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know in case of any concerns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Karan Gajjar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 08:49:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/run-gstreamer-app-on-powerup/m-p/1005435#M148996</guid>
      <dc:creator>karangajjar</dc:creator>
      <dc:date>2020-03-11T08:49:54Z</dc:date>
    </item>
  </channel>
</rss>

