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?
Asked
Active
Viewed 5,406 times
2 Answers
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
-
That's kind of what I'm trying to solve - what application is putting that there? I have the class window class name: `gnome-power-manager`, but there is no aplication called that. There is nothing matching "*power*" running as a daemon. – Shawn J. Goff Jun 24 '12 at 01:14
-
1@ShawnJ.Goff Trace the server side, i.e. the system tray. – Gilles 'SO- stop being evil' Jun 24 '12 at 01:18
-
Oh, and are you sure that the communication is via window events and not via dbus? – Gilles 'SO- stop being evil' Jun 24 '12 at 01:19
-
1@ShawnJ.Goff `gnome-power-manager` is nowadays part of `gnome-settings-daemon` – Ulrich Dangel Jun 24 '12 at 05:22
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
-
2A [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