{"id":60128,"library":"libx11","title":"libX11","description":"libX11 is the core X11 protocol client library for the X Window System.","status":"active","version":"1.8.1","language":"cpp","source_language":null,"source_url":null,"tags":["x11","windowing","gui","linux"],"install":[{"cmd":"vcpkg install libx11","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(libx11 CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE X11::X11)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"X11/Xlib.h","correct":"#include <X11/Xlib.h>"}],"quickstart":{"code":"#include <X11/Xlib.h>\n#include <cstdio>\n\nint main() {\n    Display *d = XOpenDisplay(NULL);\n    if (!d) { printf(\"Cannot open display\\n\"); return 1; }\n    XCloseDisplay(d);\n    return 0;\n}","lang":"cpp","description":"Open and close the default X11 display"},"warnings":[{"fix":"Use Xvfb or ensure DISPLAY is set appropriately.","message":"libX11 requires an X server running; it will fail on headless systems without Xvfb.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'client':8 'core':5 'gui':17 'librari':9 'libx11':1,2 'linux':18 'protocol':7 'system':14 'window':13,16 'x':12 'x11':6,15","created_at":"2026-06-16T19:17:33.922096+00:00","updated_at":"2026-06-16T19:17:33.922096+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}