11/30/2023 0 Comments Xscope tutorial![]() One approach could be to use strace (or the equivalent command on your system if not Linux) to trace the send/receive system calls that your application does to communicate with the X server. Now, if you can't change $DISPLAY and want to capture the traffic of an already running local X application that uses unix domain sockets, that's where it gets tricky. You can then set $DISPLAY to localhost:4 and capture the network traffic as above or tell socat to dump it with -x -v. If it doesn't, you can use socat as a man in the middle that accepts connections as TCP and forwards them as unix or abstract: socat tcp-listen:6004,reuseaddr,fork unix:/tmp/.X11-unix/X4 If your X server listens on TCP (but they tend not to anymore nowadays), the easiest is to change DISPLAY to localhost:4 instead of :4 and capture the network traffic on port 6004 on the loopback interface. ![]() Either /tmp/.X11-unix/X4 or the same path in the ABSTRACT namespace (usually shown as in netstat output). When $DISPLAY is only :4 (short for unix/:4), then clients use a unix domain socket. In that case, you can capture the traffic with any network sniffer like tcpdump or wireshark by capturing the TCP traffic on that port. The TCP port is then 6000 plus the display number (in that case 6004). When DISPLAY is set to host:4, short for tcp/host:4, clients use TCP to connect to the server. ![]() You can talk X11 over TCP, or over a Unix domain socket or (on Linux) on a Unix domain socket in the abstract namespace. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |