Windowless Rendering

Hello,

I want to render OpenGL content to a picture without opening a window.
I solved that for windows, but would rather have a platform independent solution. What would be a good approach? I must admit, that I haven't done anything with OpenGL on Linux, yet.