Don't require gstd-check-user-xenv.sh for systemd service
The gstd-check-user-xenv.sh script does not appear to be required for running the gstd service so we shouldn't require it for the service to start.
Note that the non-systemd init script already does not require this.
rebased
@jcaballeros do you mind taking a look at this? I recall there was a reasoning behind this.
@jcaballeros may I have your input on this one?
That script requirement was added because when the service is enabled to autostart, gstd starts before the x environment variables are defined and can't display things, though the pipelines run. I tried adding the dependency to the UI target (After in the unit file) instead, but it didn't work appropriately for Jetson at the time, so I enforced it with this script.
That script requirement was added because when the service is enabled to autostart, gstd starts before the x environment variables are defined and can't display things, though the pipelines run.
So making it optional like I did should be ok though right? For example if one isn't using x11 and is instead using wayland or a headless system this will cause the gstd service startup to fail entirely.
I tried adding the dependency to the UI target (After in the unit file) instead, but it didn't work appropriately for Jetson at the time, so I enforced it with this script.
Hmm, looks like it's expected that x11 should execute this script to set things up. Maybe jetson's systemd doesn't include that script or there's some dependency issue there? I don't use x11 myself so I'm not very familiar with it in general(I use wayland with the weston compositor).
@jcaballeros can we have a follow up here?
Making the xenv script optional will cause issues in PC/Jetson cases where GstD is used to display. This script does not define the x environment variables, instead, it prevents GstD to start successfully until these variables are defined, so making it optional would cause its failure to be ignored and GstD would start successfully but unable to display video. I agree that we need to remove the dependency on headless systems, maybe we can check if the UI target works well on the latest Jetpack versions and avoid the use of the script.