IT lexicon › Programming › xscope

xscope

Programming På svenska → Updated: 2026-10-09
More info
Creator
James Peterson (MCC)
Released
Type
Debugging tool
Source
gitlab.freedesktop.org

A protocol sniffer for X11: it sits as a proxy between client and server and prints every request, reply, event and error in plain text.

xscope was written by James Peterson at the MCC research consortium in Austin in 1988 and lived in the X11 contrib tree. It listens on a display number of its own, forwards to the real server and decodes the traffic in both directions: xscope -i1 -o0 accepts on :1 and sends to :0, and the client under investigation is started with DISPLAY=:1. The output is the X protocol laid out as in the specification, CreateWindow with all its attributes, GetProperty with its reply, Expose events with rectangles and errors with sequence numbers, which is exactly what you need when Xlib's error handler merely says BadMatch about a request sent long ago.

The tool belongs to the same family as strace and tcpdump, but for a single protocol, and it remained the practical way to see what an Xt or Motif application was really doing: how many round trips a startup cost, or why a window was redrawn three times. It has spawned offspring, xmon with a graphical front end and xtrace from 2005 with support for newer extensions, and Wireshark can decode X11 from a pcap file, but xscope is still maintained by X.Org and handles most of what a server understands.

← Back to the lexicon