Glut application icon in linux (x11)

I would like to add an application icon (meaning the icon in the title bar) to my program. Does glut provide this functionality? And if not how do you do that with x11?
Furthermore i would like to use a XPM icon.
Any help is appreciated. Thanks ahead.

Dunno if GLUT supports. Nowadays with modern window managers, usually you set this up through the window manager.

However, app can “hint” to the window manager what icon it’d like. See XSetWMHints and icon_pixmap in xv.c in the XV sources (