forwarding application

How i can forward application gui from tx2?

I am using in the host (ubuntu 16.4 && nvidia P3000) nsight in cross compile mode to develop and i want forward the application that is running on jetson tx2.

In the jetson i have export the screen:
$ export DISPLAY=:!10 (:10 because i use the tx2 with out hdmi)

In my simple demo app i do that:

int main(int argc, char** argv)
setenv (“DISPLAY”, “:10.0”, 0);
glutInit(&argc, argv);
glutInitWindowSize(300, 300);
glutInitWindowPosition(100, 100);
glutCreateWindow(“Hello world :D”);
return 0;

When i run the the app both trough Nsight and ssh -X i have this error:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34

I think that is a problem of my code, because when i lanch programs like gedit with ssh -X it are forwarding on the host


Not sure, but I would suspect:

setenv ("DISPLAY", ":10.0", 0);

unless you have 10 displays attached.
You may try to comment it if you use ssh -Y, or set it rather to:

setenv ("DISPLAY", "a.b.c.d:0.0", 0);

where a.b.c.d is the IP address of the host where you expect it to be displayed.


i try this with my host ip

setenv ("DISPLAY", "a.b.c.d:0.0", 0);

but nsight say me : failed to open a.b.c.d:0.0

if i comment the line setenv and lanch the application from ssh -Y i have the error:
X Error of failed request: BadValue (integer parameter out of range for operation) …

Can you attach a monitor to jetson and use

setenv ("DISPLAY", ":0.0", 0);

It should show on the local display. If it fails, maybe there are some GL libs missing.

If it works, then you may try again with host ip and give X access to Jetson into your host with xhost:

xhost +<jetson_ip>


i am connect with tx2 with remote desktop app of ubuntu (

when i run the application from nsight with :

setenv ("DISPLAY", ":0.0", 0);

in the remote desktop of tx2 there is the application, and all is ok

i try :

xhost +<jetson_ip>

and lanch the application but i have the same error:
X Error of failed request: BadValue (integer parameter out of range for operation) …

Keep in mind that if you forward through an X11 method you are forwarding X events instead of the desktop…the subtle point is that then your PC will need to have CUDA and OpenGL/GLES in whatever way the program expects. If you happen to have a Titan Xp I’m sure you’ll be astonished at how fast that Jetson is running :P

The xhost, DISPLAY environment variable, and other things suggested above should work if done right (and would in fact be the first step in deciding what to do next). If you want to be absolutely certain everything is running on the Jetson, then you might want to install a virtual desktop server and then use a desktop sharing program (I have no specific recommendation, but basically the “VNC” viewers). See:

A further advantage of a virtual desktop over X forwarding is that it becomes cross platform. X forwarding only works on systems with X running. With virtual desktop sharing a Mac, Windows, or Linux can all work this way. The actual software running on the Jetson won’t care that you’ve pointed the DISPLAY to a virtual/non-physical desktop, it’ll “just work” (you would still need to set DISPLAY, but it would point at the virtual server instead of a server with a monitor). If you don’t understand how to set DISPLAY for local/remote, then you won’t know how to use DISPLAY to point at a virtual server. Figure out DISPLAY first, and then move forward.

1 Like


I am using remina remote desktop and all go well.
I will try to tigure out the DISPLAY.