echo $DESKTOP_SESSION should tell you what Desktop Environment is in use. ubuntu == some gtk based DE, unity by default. The others I don't know off-hand, but that environment variable is there for exactly this purpose.
Ubuntu could also be GNOME. Unless you see KDE as the desktop environment, or LXDE, or XFCE, it's Ubuntu – The Lord of TimeApr 29 '12 at 4:33
True...I'll edit to address that, but either way both gnome and unity are gtk based toolkits, which is what the OP was after – Call me VApr 29 '12 at 4:36