Skip to content

Instantly share code, notes, and snippets.

@henri
Last active February 19, 2026 03:40
Show Gist options
  • Select an option

  • Save henri/0f6989f95a70bfea1ed84e3c2b509b3d to your computer and use it in GitHub Desktop.

Select an option

Save henri/0f6989f95a70bfea1ed84e3c2b509b3d to your computer and use it in GitHub Desktop.
x11 cheatsheet

X11 server cheat sheet

Number of supported clients / servers

/etc/X11/xorg.conf.d/99-maxclients.conf

Section "ServerFlags"
    Option "MaxClients" "512"
EndSection

Number of connected clients

Best guess at current connections on the system,

Note : this is not nessasarily accurate for various reasons.

netstat -an --unix | grep X11-unix | wc -l

# find the client hogs
lsof -U +c 15 2> /dev/null | cut -f1 -d' ' | sort | uniq -c | sort -rn | head -3
# show total clients used
netstat -an --unix | grep X11-unix | wc -l
# call the root node for a tree view
xwininfo -tree -root
# seems like it would do what is needed but not accurate
xlsclients -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment