Again, "sudo -s".

Or in this case, just "sudo gui_prog".

The reason is that when you su, your whole environment is cleared and you're running as a completely different user, which means that your X server authorization is gone. You could get around it, but it's either a security problem or a pain in the ass, depending on which way you go. sudo just changes your euid.
_________________________
Bitt Faulk