View Full Version : OpenGL on Linux without X?

02-02-2007, 01:52 PM
Is there a way to use OpenGL on Linux without X?

For example..install a generic linux kernel without X on a PC, install the video driver (say the nVidia/ATI closed source) and run an OpenGL app in full screen mode?


02-02-2007, 11:19 PM
Check for Mesa off-screen and search for previous posts. This has been covered several times thought this might help you.

02-03-2007, 02:36 AM
>>install the video driver (say the nVidia/ATI closed source)
closed-source drivers from ATI/NVidia, as well as open-source driver from Intel require X11.

PS. X11 without unnecessary modules very lightweight application and not require many memory or CPU power.

02-03-2007, 07:19 AM
Thanks folks...

Although, Mesa is only for software rendering, correct? I was looking for using OpenGL with the closed source ATI or nVidia drivers.


02-04-2007, 01:26 AM
AFAIK there aren't any solution then.

What exactly do you want to do ?

02-06-2007, 03:33 AM
Take a look at X.org 7. They have modularized their X server. You can try to install only a bare minimum of their modules, so you end up with an X server that is just enough to display a single fullscreen GL application. This should not take too much resources, if that's what you worry about.

I have not tried this myself, and it's not going to be easy. It propably involves manually building the X server from source.

02-06-2007, 05:10 AM
Thanks folks. A colleague and myself, for a side project, want to see if we can create an opengl application without X.

X makes writing 3d opengl apps more confusing than it really needs to be.

thanks again,

02-07-2007, 08:09 AM
X makes writing 3d opengl apps more confusing than it really needs to be.If that's the only reason, just use glut, SDL, GLFW or one of the other toolkits.

04-08-2007, 08:31 PM
>"Is there a way to use OpenGL on Linux without X?"

yes, here:

myOS - Linux based OpenGL development system without X

Minimalistic GNU/Linux system, stripped down of everything, but core necessary files to compile and run OpenGL/C code. It has simplified directory structure and cleaned up internal cross referencing. Programs compiled in myOS will run on any Linux with or without X.

Copy of the OpenGL Red Book is included, together with 45 examples from the book. Examples are organized by chapters, each in separate folder, ready to compile, run and play with. Source code is modified to use Scitech drivers and is very similar to GLUT version in the Red Book. This little collection is really all one needs to learn OpenGL. In fact the whole system being very simple to use or analyze and understand, can be a tool to teach Linux basics and C/OpenGL programming.


other "OpenGL without X" drivers/projects:
* fbdev/DRI drivers from the mesa3d project
* directFB
* GGI/libGGI
* Scitech SNAP/MGL

links are here:

04-09-2007, 11:29 PM
Originally posted by Fejimush:
Thanks folks...

Although, Mesa is only for software rendering, correct?

fej No.

04-19-2007, 02:53 PM
But Mesa without X is for software rendering only. At least I am not aware of any hardware accelerated drivers that do not require X.

04-23-2007, 01:09 PM
Jon Smirl and Dave Airlie had it working once on r200 (EGL without X), but with current Mesa you'd need X for hardware acceleration.
In general Mesa is both a software implementation and a driver framework. There are accelerated drivers, the DRI drivers being the most important ones.