x_display = XOpenDisplay(NULL); returns NULL on latest UBUNTU systems

Sysprogs forums Forums VisualGDB x_display = XOpenDisplay(NULL); returns NULL on latest UBUNTU systems

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #25078
    Brian Beuken
    Participant

    So after checking around, I was told to check that /etc/ssh/sshd_config had X11Forwarding set to yes

    it was.

     

    So I am at a loss, I can build test projects on the Jetson no problem and they all build and run fine.. XDisplay is opened with no issue, I can even build them from VisualGDB,  and execute them, but when run any attempt to open an Xwindow on Ubuntu 18.04 fails…. This is only happening when I try to run from VisualGDB actually running them from a terminal on the target, they run fine. So there has to be something going wrong somewhere? I accept you are only sending a request for forwarding but is there anything else that needs to be set on Ubuntu? Or something that would corrupt that request?

     

    • This reply was modified 4 years, 10 months ago by Brian Beuken.
    #25079
    support
    Keymaster

    Please check if the problem also happens when using other SSH clients (e.g. PuTTY).

    #25082
    Brian Beuken
    Participant

    I’ll install putty, but can you walk me through what you want me to do? Just navigaing to the directory and using ./ gives a segmentation fault, so I assume that also means that it was unable to get a display?

    Is there something else I should do?

     

    #25083
    support
    Keymaster

    If running the program directly results in a segmentation fault, the device configuration might be corrupt. Unfortunately, as this is not something controlled by VisualGDB, this is not covered by our technical support.

    #25084
    Brian Beuken
    Participant

    ok I’ll keep trying and report back if I find a solution, but it really is troubling this has happened on a few Ubuntu systems and means I can’t use VisualGDB on those systems. Until this is resolved.

     

    #25085
    support
    Keymaster

    If you can confirm that the problem doesn’t happen when running the program manually, but does happen with VisualGDB, we can help you understand the differences and configure VisualGDB to replicate the working setup. If the problem also happens without VisualGDB (or if another problem is preventing the programs from running on that target), unfortunately this is not something that could be easily fixed by VisualGDB and hence is not covered by our support, sorry.

    #25086
    Brian Beuken
    Participant

    If I open a terminal on the Jetson itself, navigate to the tmp\VisualGDB\c…etc folder

    and ./runnablebuild

    it runs perfectly, of course its running stand alone

    If I use VisualGDB I get no X11 display and project fails trying to use a NULL pointer I added a Fail output on no display, and exit

    If I use VisualGDB’s SSH manager and a SmarTTY console, I get the same fail

    If I use Putty to navigate to the folder and do ./runnablebuild it also fails for the same reasons and exits

    So any attempt to run from SSH seems to fail..

    I agree it seems to be an issue with the target, but do you have any tips where I can try to find out why a display cannot be opened. I haveused Xhost +, ensured X11Forward is set
    Thats as much info as I can locate online

    #25087
    support
    Keymaster

    Sorry, the only way we can manage the large amount of inquiries we receive and ensure fast turnaround for VisualGDB fixes is by being upfront and strict about the scope of our technical support. Troubleshooting Linux configuration issues can be tricky and there are numerous online resources that could help with that, but unfortunately it is not realistic for us to offer this type of help as a part of our regular product support.

    #25088
    Brian Beuken
    Participant

    Ok I’ll update you if I make progress.I noted the issue on Nvidias forums as well, so given that lots of people are doing graphic work  on these boards someone must be also using an ssh connection to develop.

     

     

    #25100
    Brian Beuken
    Participant

    found it.

    I figured it had to be something to do with access rights somewhere, so I went to the settings and checked the Securty and Privacy->Password settings. I didn’t see anything odd there, but while I was in I switched to autolog on.

    Guess what.. that solves it.. My projects now happily build and run and can be executed from my VisualGDB debug command.

    To double check I set autologin back to off and sure enough my VisualGDB failed again

    So the secret is… ensure you have automatic login, with your matching ssh username

    Bizzare issue…Dunno why this is happening, but very happy I resolved it.

    If anyone else is using an Ubuntu 18.04 system and fails to get an Xwindow to open, this may be the cause.

Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.