When using the OpenGL fixed function pipeline for vertex setup, how a fragment program looks like that is compatible to the fixed function vertex setup? I guess that usually
Well, in the normal GL fixed function pipeline, lighting and goraud shading are done entirely in the vertex stage of the pipeline (with a little bit of help from the rasterizer), so if you have no texturing, the fragment shader becomes a simple pass-through (gl_FragColor = gl_Color;
) and doesn't actually do anything.
Now you CAN do per-fragment lighting, by writing your own fragment shader that does it, and it may even make sense to do that if you want directional spotlights or some such, but that has nothing to do with the fixed function pipeline.