Xlib Programming in C and Linux Tutorial #01 – Creating a Window

An example of using the Xlib to create a blank window using the XOpenDisplay(). XCreateSimpleWindow(), XSelectInput(), XMapWindow(), and XNextEvent() functions. Also, it shows how to process the events. The Xlib is an interface to the X Window System to communicate with the X server.


IPEPROTO iPê says:

Hello ShellWaveX and thank you very much for your tutorials.

I would like to know if you have the source code of your tutorials hosted somewhere.

Thank you!

Nickolay Ilyushin says:

Writing linux apps via windows)

Utpal Rathod says:

font size too small …

CVbEats says:

This tutorial is really good.

Lokesh Kumar says:

would you tell me how to set the image in the window that is created? Is there any function/method to set the image?

Jose Arriaga says:

Never mind, I figured it out! lol was using -1X11 when it should have been -lX11

Jose Arriaga says:

can you help, I’m getting the following error:
gcc: error: unrecognized command line option ‘-1X11’

Assa Sin says:

how to instal libX11-devel in ubuntu?

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!