Removing X dependency and just use OpenGLES/framebuffer graphics on linux

For the part regarding the removal of dependency upon X, you can perhaps ger some hints from this: