On Mon, 16 Oct 2006, Rob Sherwood wrote:
On Mon, Oct 16, 2006 at 11:17:39PM +0000, Alexey Toptygin wrote:
I've got this CentOS 4.4 machine, and I can't run X apps under sudo, since
they get rejected by the X-server. DISPLAY is set correctly in the sudo
environemnt, but xterm (for example) says 'Xlib: connection to ":0.0"
refused by server'.
Make sure somethiing isn't changing $HOME to /root; it needs to be /home/$you
so that it can access the right .Xauthority file.
That wasn't the problem, but you were closest to the truth: /home is NFS
mounted, so root can't read the .Xauthority file :-(
Does anyone know how to convince kdm to put the user's cloned Xauthority
(not kdm's own /var/run/xauth/*) somewhere else? I see a comment in
/etc/kde/kdm/kdmrc that says it will stick it in UserAuthDir if it can't
create it in $HOME, but I can't prevent it from unlinking and creating a
new .Xauthority in $HOME since I own the directory...
Alexey