Forums

Full Version: Linux getting in the way X11 not initialising
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've noted before that I had some trouble with ubuntu systems throwing up strange errors unable to open Displays causing failure of our test projects I thought it was limited to Ubuntu, but today I had it on a Tinkerboard system which is Debian, it did however throw a much more useful No Protocol supplied, error, which after a bit of googling resulted in some answers.

I can't honestly explain much about how any flavour of Linux works, its a total mystery to me and the way it seems to over protect things you want to directly access is frustrating, but it does seem that  some of our issues are related to lock of display system by the OS.

If you don't have root access we know some things get hard to use, like keys and mouse, but it seems also the screen....


One solution is to enter 
xhost +  
on a terminal, and then you can finally open the screens.

But then of course you have all kinds of other issues Big Grin
I've tested this now on both the XU4 and Tinkerboard and indeed this fixes the problem of access to the screen and with it the OpenGLES set up allowing your openGL init to work.

However I am still having issues getting a display, so I'll review this and report back when I get some new info

It also seems to be ok if you are running as a root user (which makes sense)
making sticky
Small update, the display issues, which is basically a blank screen, is explained by an issue with my depth buffers....but the problem is I don't know why I'm having an issue with my depth buffers. If I don't enable them, I get screen updates, but with polygons clearly not being properly sorted....if I do enable the depth buffer...I get blank screen

This is only happening on X11 based systems though, Raspbian and Windows PC tests are totally fine.. So its a bit of a head scratcher, which will probably turn to to be blindingly obvious when found, but for now I'm a bit stumped.

I'll do more research and see what I can come up with
Aha, I found it, and it was a bug...my bug, of course, but very strangly it only showed up on X11 systems.

Basically, xhost + fixed the inability to open a window, but my test project uses a shadow framebuffer which I was clearing, but I wasn' t clearing the main frame buffer,

Quite strange it worked on Raspbian and most Debian systems. But hey ho, just a bug, a good example of making sure your project runs on lots of different targets.
Also try to log in as root, then everything is open to you
You could try just running 'su -' when logged in as a user to get to root.

So, running 'sudo' before running the program did not work?
I don't run the programs from the console, always from Visual Studio...in principle I can add a sudo command before the run but it means messing with the commandline and I don't like to complicate things.

I knew nothing about linux when I started the book and I still know nothing about it Wink Its just not an interesting OS for me and its annoying insistance on ownership of things is frustrating to say the least.

I just want to type code, press build&run and see my efforts....anything that gets in the way of that is noise.
(10-15-2018, 06:48 AM)Brian Beuken Wrote: [ -> ]I don't run the programs from the console, always from Visual Studio...in principle I can add a sudo command before the run but it means messing with the commandline and I don't like to complicate things.

I knew nothing about linux when I started the book and I still know nothing about it Wink Its just not an interesting OS for me and its annoying insistance on ownership of things is frustrating to say the least.

I just want to type code, press build&run and see my efforts....anything that gets in the way of that is noise.

Funny, I have the same feelings when it comes to Windows, especially Windows 10. 

Linux and UNIX take an opposite approach from what MS Windows does, in that with Linux/UNIX access is limited to prevent undesired messing with the vital parts of the OS, or Kernel.  Windows on the other hand leaves the door, or rather Window open for everyone to join in and have a party on the system, hence the need for the multitude of virus checkers and constant patch upgrades.  However, I've worked in environments where the Windows systems were so locked down that you could barely read a text file without getting proper authority. 

The thing with Linux is that there are so many variations of the theme that what one learns on one version does not necessarily apply to another.  The main being between the Fedora based OSes such as Red Hat and CentOS and the Debian based that includes Ubuntu. 

The odd thing is that game dev started on the Unix/Linux based systems (or early derivatives) as well as on the Apple systems and Microsoft is a rather new player in the arena.  MS, or those that developed with it like Carmack just took things to an extreme with OpenGL and DirectX where the Linux and UNIX developers went another path. 

Although, it would seem that mobile devices have come back to Linux based kernels and Apple as platform for developing games.

It's all good though.