How my camera can display what it sees directly inside the no machine window,in headless mode

I’m trying to configure correctly this cam :

because I want to run it on my jetson nano when it is in headless mode within the nomachine client window. It means that I want to see what the camera sees while I’m using ubuntu 18.04 installed on the nano within the nomachine client. Following the suggestions of the nomachines guys,I have disabled the xserver using this command :

sudo systemctl set-default multi-user.target  

and I have installed xfce4. It works when the HDMI monitor is attached to the board,but it doesn’t when I’m in headless mode. I tried a lot of combinations,such these :

gst-launch-1.0 -e videotestsrc ! nvivafilter cuda-process=true customer-lib-name="libnvsample_cudaprocess.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! nvoverlaysink
nvbuf_utils: Could not get EGL display connection
WARNING: erroneous pipeline: could not link videotestsrc0 to nvivafilter0

gst-launch-1.0 -e videotestsrc ! nvivafilter cuda-process=true customer-lib-name="libnvsample_cudaprocess.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! nvoverlaysink
nvbuf_utils: Could not get EGL display connection
WARNING: erroneous pipeline: could not link videotestsrc0 to nvivafilter0

gst-launch-1.0 videotestsrc is-live=true ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420' ! nvivafilter customer-lib-name="./libnvsample_cudaprocess.so" cuda-process=true ! 'video/x-raw(memory:NVMM), format=RGBA' ! nvegltransform ! nveglglessink
nvbuf_utils: Could not get EGL display connection
Setting pipeline to PAUSED ...
Using winsys: x11
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...

this seems to be the better…

gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! xvimagesink -e

since it produces something like this :

![f614844a8719eda48521a2738ffcb071e605d0e2|690x370]

I want that the camera shows what it sees directly inside the box where you read “here”. thanks.

(upload://9PEEa5JCuacxKiQ894935XNLnzF.jpeg)

Have below reference to enable the RTSP for check the camera preview remote.

There are several posts for your reference:
https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/#5187270
https://devtalk.nvidia.com/default/topic/1014789/jetson-tx1/-the-cpu-usage-cannot-down-use-cuda-decode-/post/5188538/#5188538
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828
https://devtalk.nvidia.com/default/topic/1049924/jetson-agx-xavier/using-rtsp-encode-with-h264-and-stream-images-at-device-memory-on-xavier-/post/5331159/#5331159