glut lib vs. glx lib.

can anyone tell my why prefer one to the other?. Incus

First off…this is rather unix question so I would sugest you post it on the linux forum.
glut is a ( dead ) helper lib - platform independant.
GLX is a lib to integrate the ogl into the X stream protocol.
So you can’t use only GLX - need to use X-server libs too.
But it gives 100% control over the stuff.
GLUT is good when you want to learn the ogl.
In my opinion - want to be serious - use native API not helper wraper libs

and third.
GLUT encapsulates the stuff to create windows etc on the system…so on unixes it will use GLX + X, on win32 WGL and Win32 api etc

Very, very true. Glut and other wrapper APIs are good for starting out and wanting to get some results fast, but sooner or later you NEED to learn the core system API calls of your host systems Glx on Unix, wgl on Windows. Keep your own calls to any system specific functions encapsulated on your own and when you port you only have to write those portions. And don’t be afraid to steal, errr… borrow, code from the public domain.