Full Version: X11 XOpenDisplay returns null causing crashes when you try to use it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is an issue I had with Ubuntu 18.04 running on an Nvidia Nano but I have noted a couple of other Ubuntu systems would fail to run demos so this may be the cause for them too.

Basically if you can't get an X11 window to open from your VisualStudio deployed app, you have to make sure that you are indeed using the correct log in name for your SSH connection and the Target. This is very unlikely to be different.

The issue however seems to relate to autologin on Ubuntu if you are signing in manually, even as your expected user name, you can transfer build and run, but your builds will fail whenever they try to get an X11 display to set up graphics.

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 autologin to 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.

Did you set autolog off or autologin off/on?

Anyways, it good you got it working.
I have to set it to on.

if you do a manual login, it just refuses to work over ssh