In the system monitor application (gnome-system-monitor), there is a column titled "Command Line" that gives the command (complete with arguments) that was used to create that window.
Is there a command that allows you to select a window via clicking (like xkill), then returns the command called for that window?