Although one should not use root to run graphical programs, it usually works and does not give such errors, unless you are running in chroot. But just try out one of the commands I mentioned, one of these should already be installed.

@Pegasusearl Do you mean you run sudo nautilus as with root privileges or do you run sudo nautilus as normal user? In first case just type nautilus, in second case use gksudo nautilus (on Gnome) or kdesudo (on KDE).

EDIT:
Or do you want to use the graphical program on a remote computer?