Forums
X11 XOpenDisplay returns null causing crashes when you try to use it? - Printable Version

+- Forums (http://www.scratchpadgames.net/forums)
+-- Forum: Main Forums (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=1)
+--- Forum: Help my code won't work?? (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=22)
+--- Thread: X11 XOpenDisplay returns null causing crashes when you try to use it? (/showthread.php?tid=483)



X11 XOpenDisplay returns null causing crashes when you try to use it? - Brian Beuken - 06-07-2019

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.


RE: X11 XOpenDisplay returns null causing crashes when you try to use it? - jomoengineer - 06-09-2019

Brian,

Did you set autolog off or autologin off/on?

Anyways, it good you got it working.


RE: X11 XOpenDisplay returns null causing crashes when you try to use it? - Brian Beuken - 06-09-2019

I have to set it to on.

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