vnc typically works mapping entirely the display content of the embedded device [ jetson] as long as there is a hardware display connected to the jetson.
Also there is alternative way that might be used:
scenario 4. Accessing Jetson_NX graphical applications over vlc & x2x. From a Linux client.
It is a hybrid method, in certain cases it might require to use few computers including windows computer and linux computer. The former will display the video output and the latter will act as keyboard/mouse controller.
0. Make sure a hardware display is connected to Jetson_NX
At Linux computer[client] execute:
sudo apt install x2x
Connect to Jetson_NX over ssh terminal, navigate to the target folder
ssh ***jetsonNX***@*JetsonNX_ipaddress* -p *portnumber*
Export the DISPLAY output variable so that the hardware display connected to jetson will be the target source of the execution.
For DisplayPort connected display
For a HDMI connected display the value will be 0 or 1 in the step above. To detect the type of the display connection ‘xrandr’ can be executed:
Further a resolution of the streamed content can be adjusted e.g. with
xrandr --fb 1280x960
Start streaming server
./test-launch "ximagesrc use-damage=0 ! nvvidconv ! nvv4l2h265enc ! h265parse ! video/x-h265, stream-format=byte-stream ! rtph265pay name=pay0 pt=96 "
Connect a vlc player e.g. from local windows computer]
Network streaming source to specify : rtsp://ipaddress_ofJetsonNX:8554/test
If the connection doesn’t establish and in the terminal from step 4 there are messages about BLOCKING mode that means that export DISPLAY variable needs to be changed. Then the streamer server needs to be restarted and vlc playing will need to be tried again.
After there is a visual confirmation from the step 5 the only steps required to mount local keyboard & mouse to control these from local linux host is:
ssh -X JetsonNX@IP_address -p portnumber'x2x -east -to :0'
However, once the connection establishes it will be required to move the local cursor to the east of the display so it will extend to the vlc displayed display. Keystrokes will now go to the jetson display that is being streamed. To regain control to the local display - move the mouse out of the borders of the jetson display.
Sometimes if 0 display can not be opened 1 value might need to be used in the command above.
The defined method is just streaming of the display + separate controls
It also works over the Internet e.g. with ngrok tunnel