Tuesday 12 April 2011

Want to debug an old status icon applet?

If you want to debug an "old" status icon when running the GNOME Shell, and it duplicates functionality from a icon in the shell itself (say Bluetooth or Sound volume, in my cases), there's two tricks available.

The shell looks at the WMNAME for the applet when choosing to hide it, or show it.
  • For most applets, gtk_status_icon_set_name() isn't called, we just need to change the binary name. Create a symbolic link to your binary with a different name (say, "test-applet"), and launch your application from that.
  • If the applet calls gtk_status_icon_set_name(), just name it differently. Unfortunately, that will require recompilation.
With those tricks, I fixed the volume status icon for the fallback mode, and helped Frédéric Crozat pin-point a (likely) bug in the Bluetooth menu in the shell, as we could not reproduce the bug with the fallback status icon.

No comments: