9

In an evergoing battle against an ugly icon, I found that applications can communicate with the system tray by sending X client messages. Is there a utility for spying on these messages?

Shawn J. Goff
  • 45,338
  • 25
  • 134
  • 145

2 Answers2

10

Run the application under xtrace. It'll log all communications between the application and the X server, including the command to send or receive an X client message.

xtrace myapp
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
5

Command

    xev -id WINDOW_ID

will print X11 "window events". In X11, these things are called "events". (As opposed to "messages" in Microsoft Windows).

To obtain window id, use xwininfo.

man xev, man xwininfo.

Andrei
  • 159
  • 1
  • 2
    A [client message][1] seems to be a type of event. The freedesktop [system tray spec][2] specifically talks about an "x client message". In any case, I have the correct window, but `xev` is not giving my any information about what program is sending what event to that window, but its status is definitely being updated by something. [1]: http://tronche.com/gui/x/xlib/events/client-communication/client-message.html [2]: http://standards.freedesktop.org/systemtray-spec/systemtray-spec-latest.html#messages – Shawn J. Goff Jun 23 '12 at 21:59