Possible Duplicate:Can I launch a graphical program on another user's desktop as root? I'm trying to do the equivalent of: $ sudo -u myuser DISPLAY=:1 xtermHowever, it give me the following errorClient is not authorized to connect to ServerOn the other hand, I can do this just fine:$ sudo -u -i myuser$ DISPLAY=:1 xtermWhy isn't the X server allowing me to launch an X11-based app directly as a different user, and is there any way I can explicitly allow this?
X11: Client not authorized when calling with sudo
x11;sudo