Get the latest tech news
Opening Windows in Linux with sockets, bare hands and 200 lines of C
Intro In this post I want to create a single file C file program to open a windows inside Linux without using xlib or any similar libraries. The idea is to explore X11 protocol and see how it is used to interact with X server to create windows.
Initial request seems like a lot of information to fill but if we skip authorization process we can drastically reduce amount of code we need to write and understand. For this simplification to work we need to disable regular cookie based authentication and allow all app on local machine to connect to X server directly. Here is full source code which contains a bit more functionality than discussed in post (text movement and more detailed debug info):
Or read this on Hacker News