X11TRACE(1)
π X11TRACE(1) π β ok bestie, let's spy on some X11 traffic π
Welcome to the manual page for x11trace, and yes, the manual name is literally X11TRACE, we're doing this properly. Grab a snack, this one's a banger. π
β¨ NAME β¨
x11trace β trace communication between X11 client and server π¦
π SYNOPSIS π
x11trace [ options ] [ -s | -k ] [ [ -W ] [ -- ] command args ... ]
π DESCRIPTION π
Okay so picture this: x11trace fakes an X server and forwards all the connections to a real X server, and while it's doing all that it shows you the communication between clients in (well, theoretically) human readable form. It's giving wiretap but make it β¨debuggingβ¨.
If you give it a command, x11trace runs that named command with $DISPLAY set to the faked X server. And if that command exits before any connections are even made, x11trace exits immediately too β unless you specified -W. Rude? Maybe. Correct? Yes. π
π OPTIONS π
-Idirectory β go look into directory for protocol description files. (i.e. the directory where the.protofiles can be found, iykyk.)-s|--stopwhendone(default) β terminate when all forwarded clients have disconnected. (Or, if a program was run, once the program has finished and all connections are closed.) The classic "we're done here" energy. π«Ά-k|--keeprunningβ if all clients disconnected, just wait for new ones to connect. Main character energy, refusing to leave the party. π-W|--waitforclientβ do not stop when the started program terminates before any connection was made. (Might be necessary if the program forks to background, bestie. That's the whole point.)-dname |--displayname β forward connections to the X server specified by name instead of the one specified by the environment variableDISPLAY.-Dname |--fakedisplayname β fake display name instead of$FAKEDISPLAYor:9respectively.-ffilename |--authfilefilename β add an-f filenameto the arguments for all calls toxauth, to get the authentication tokens of the X server to connect to.-Ffilename |--newauthfilefilename β add an-f filenameto the arguments for all calls toxauth, to save the authentication tokens to connect to the faked X server.-c|--copyauthentication(default) β copy the authentication tokens for the X server to connect to, so that clients connecting to our fake server will use them.
The commands run are roughly equivalent to:
xauth add $FAKEDISPLAY . `xauth list $DISPLAY | awk '$2=="MIT-MAGIC-COOKIE-1" {print $3}'`
Not that onlyMIT-MAGIC-COOKIE-1tokens are copied, asx11tracedoes not yet support to change the authentication tokens so thatXDM-AUTHORIZATION-1would be possible. π
-n|--nocopyauthenticationβ do not callxauthand do fiddle with authentication tokens, but leave that to the user to handle. You got this, you're so capable. π«‘-e|--denyextensionsβ modify all server replies to say there are no extensions available. (Asx11tracedoes supports only a small number of extensions anyway and calls all extended requests "unknown" and all replies to such requests "unexpected".) It's giving "no thoughts, head empty" but for extensions. π-w|--readwritedebugβ print how many bytes are read and/or written, and when. Numbers girlies rise. π₯-mcount |--maxklistlengthcount β print only the first count many elements of all lists. Trimming the fat, periodt.-i|--interactiveβ only sent requests from the client to the server after interactive confirmation. Confirmation is given by pressing enter, or a number followed by enter, via stdin. This can give funny results when multiple clients are tunneled. π-o|--outfilefilename β dump output into filename instead ofstdout.-b|--bufferedβ do not write every line on its own, but wait until buffers are full. Speeds up things a little bit when outputting to a file. Not very useful at all together with-i. Just so you know.--timestampsβ print a timestamp before each line.
Note that the time a packet is printed is between the time a packet is received and the time a packet is sent, but it gives no other information than that. Lowkey important, don't overthink it.
--relative-timestampsβ print a timestamp relative to the beginning of the connection before each line.
Note that the time a packet is printed is between the time a packet is received and the time a packet is sent, but it gives no other information than that. Same disclaimer, bestie.
--monotonic-timestampsβ print aCLOCK_MONOTONIC(seeclock_gettime(3)) timestamp each time a package is printed. This is likely to be the uptime of your system.
Note that the time a packet is printed is between the time a packet is received and the time a packet is sent, but it gives no other information than that. Yes, again. It's a whole thing. π
--print-offsetsβ print offsets of all fields (useful to debug nested lists in protocol descriptions). Nested lists could never, but here we are. πͺ--print-countsβ print counts (useful to debug lists in protocol descriptions).
π ENVIRONMENT VARIABLES π
DISPLAYβ without--display, the content of this variable is used to determine the server to connect to. (And without-ngiven toxauth, to get the authentication tokens for this display.)FAKEDISPLAYβ without--fakedisplay, the content of this variable is used to determine how to listen for clients. (And without-ngiven toxauth, to set the authentication tokens for this display.) If neither is given,x11tracewill try:9. Bestie's backup plan. π§XAUTHORITYβ without-nand without-for-F, yourxauthprogram will most likely look into this variable for the file to get/save the authentication tokens from/into. If this is not set, it will most likely use$HOME/.Xauthority.
π REPORTING BUGS π
Report bugs to <brlink@debian.org> or the Debian BTS. We're not mad, we're just disappointed. (No we're not, we love feedback.) π«Ά
π SEE ALSO π
xauth(1), x(7x),
π COPYRIGHT π
Copyright Β© 2005 Bernhard R. Link
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Read it and weep (respectfully). π
And that's the whole page, bestie β this was x11trace, dated 26 June 2009, and you absolutely ate that reading comprehension. Now go trace something. πβ¨
π¦ where this page comes from
- fedora 43: x11trace 1.3.1-30.fc43 Β· GPL-2.0-only
- fedora 44: x11trace 1.3.1-31.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms