In gnome, clicking the Show Desktop buttton doesn't cause a seperate program to be run. It invokes code within the gnome-panel that sends a hint to the window manager (_NET_SHOWING_DESKTOP). The window manager then minimizes the windows (if it supports that hint, like metacity does).
See:
http://www.freedesktop.org/Standards...html#id2503313
It would be quite possible to write a seperate program to do this, but I don't happen to know of an existing one.