Re: xdm and su xauth problem
On Sun, Aug 13, 2006 at 15:16:16 +0200, Lubos Vrbka wrote:
> hi guys,
> this is probably some stupid mistake or omission i made...
> so far, i was starting X using the startx command (i.e., under ordinary
> user). recently i installed xdm to handle my logins (so X is now started
> under root, i guess). everything works fine except that after login as
> an ordinary user...
> $ su
> # xeyes
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> Error: Can't open display: :0.0
> surely, running
> xhost +
> remedies this problem, but that doesn't seem to me as a good solution...
> so what should i do to get it back working?
One possibility is
xauth -f /home/user/.Xauthority extract - $DISPLAY | xauth merge -
where "user" is the user that logged on to xdm. This will extract the
user's authorization cookie for the current display and merge it into
root's authority file. Then root should be able to access the display
until user logs out again. (I tested this with kdm, but I assume it
works for xdm as well.)