Does anybody know how to visually see the graphics of a sample ran on Jetson TX2? I am currently using the host computer ssh with the jetson and when I run the samples on the terminal they successfully run but I cant see anything visually. Is there a program I need to download to be able to see this on the host computer without having to connect the board to a monitor?
Do I need to download a graphics package or something?
There are essentially two possibilities, but it isn’t straight-forward. First, under Linux you are running a graphics server known as the X11 protocol, or just X. A typical GUI program runs on any machine, and then talks to the X graphics server by sending events over a network protocol. In most cases it happens that the video card serving the program being run is on the same machine and does not even need a network card (it still uses a network protocol, just not over a network).
Optionally, you can run a program on one machine, and if you set up security details, display it on the GUI of another X server on a different machine. Suppose you ssh from the PC host to the Jetson client via “ssh name@wherever”. Your ssh connection is not associated with any X server until the environment variable “DISPLAY” is set. Usually the local display for the first video card is “:0”…set by “export DISPLAY=:0”. If on your ssh connection you were to set DISPLAY this way while someone is logged in via the same user account locally, then running “gimp” like this would mean the person on the PC running gimp would cause gimp to display on the Jetson.
The reverse can be set up by using “ssh -Y name@whereever” (notice the “-Y” option). In this case you don’t set DISPLAY, you just run “gimp”, and gimp appears on your PC instead of Jetson…but gimp is actually running on Jetson.
If you are doing GPU work with CUDA, this isn’t what you want. The trouble is that your client program is sending X11 events and the GPU used to produce the graphics is not on the Jetson when forwarding to the PC…the GPU and video of the PC would have taken over. If the GPU/video of the PC does not have the correct CUDA/OpenGL/OpenGLES as the program wants, it will fail…worse yet, if you think you are running on the Jetson and benchmarking, but the PC has the correct software, you will never notice that the program is running unusually fast…this would be the PC’s video card being much faster.
To run on the Jetson, with the Jetson doing the GPU work, the Jetson needs to know the DISPLAY is local to it. You don’t need a physical monitor, but you do need to configure it to use a virtual buffer. VNC or TurboVNC or a number of virtual desktop programs do this. It is the basis of desktop sharing software. Then a client program runs on the PC which connects to the virtual server…the client program sees a screen buffer and not X11 events. I have not had to set up a virtual desktop on Jetson, someone else here would be able to tell you the steps. You only need ssh to run commands, you need a virtual desktop to run the GPU on the Jetson if displaying to another machine…else you would have to do something like save a snapshot of graphics to a file and copy the file to host…probably also not what you wanted.