Wireshark has the ability to analyze the X-Window protocol.
However: you must first catch the actual X-Window traffic between the X client (application) and the X server before Wireshark can analyze it.
X-Windows traffic between the application (X-Windows client) and the X-Windows Server running on your local computer probably uses "Unix domain sockets" for direct interprocess communication (IPC) between the client and server. There is no main network protocol, and thus, traffic (AFAIK) is not removed to open Wireshark).
It has been some time since I dealt with X, but I think that it is mainly necessary for the X-Server to work on a box, so that the server listens for (and agrees to accept) network connections. If the Xclient application on the remote node (or local node?) Then connects to XServer over the network, you can capture this traffic to crack Wireshark.
X is complicated; If you are not familiar with the details of X, you will need to read or ask for more information. I have long forgotten the details related to X.
source share