Registry / networking / x11rb
library0.13.2rscratesunverified

Rust bindings to the X11 protocol, providing safe and ergonomic access to X11 display servers.

# Cargo.toml [dependencies] x11rb = "0.13.2"
INSTALL
IMPORT
SIG · X11RB
X
x11rb
networkingrustv0.13.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connection
use x11rb::connection::Connection;

Connect to an X11 display and print screen width.

use x11rb::connection::Connection; use x11rb::protocol::xproto::*; fn main() -> Result<(), Box<dyn std::error::Error>> { let (conn, screen_num) = x11rb::connect(None)?; let screen = &conn.setup().roots[screen_num]; println!("Connected to X11, screen width: {}", screen.width_in_pixels); Ok(()) }
Debug
Known issues
gotchaRequires an X11 server running; will fail on Wayland-only systems without XWayland.
fix
Ensure an X11 server is available or use XWayland.
affects: >=0.1.0
Upgrade
Version history
0.13.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
x11rb — cargo add x11rb · libregistry