[svlug] couldn't connect to display ":0.0"
J C Lawrence
claw at kanga.nu
Tue Sep 7 05:11:47 PDT 2004
On Mon, 6 Sep 2004 19:39:03 -0700
David E Fox <dfox at m206-157.dsl.tsoft.com> wrote:
> On Wed, 01 Sep 2004 23:25:36 -0600 "skip evans"
> <skipevans2004 at hotmail.com> wrote:
> The other thing is I don't like xhost.
It is inherently insecure.
> I used to have all sorts of problems with it not working properly on
> RH a few years ago.
!?
> Do you have difficulties running this script (I suspect it needs some
> X resources) as root from an xterm that you've su'ed prior to root?
Getting Xauthority properly setup is not difficult. The general picture
of what's going on is:
1) Some program generates a magic cookie (arbitrary string) and writes
this to a file.
2) The name of this file (often ~/.Xauthority) is passed to the X
server.
3) The X server writes an entry for the DISPLAY into your
~/.Xauthority file.
4) Xlib reads ~/.Xauthority when you create a window, and passes the
cookie value back to the X server.
See your X11 init and control scripts (usually down under /etc/X11) for
details. This is no hard stuff. To (re)synchronise the session key
across hosts:
xauth nlist $DISPLAY | rsh other.host xauth nmerge -
Or just use SSH's X11 forwarding.
--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
claw at kanga.nu He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
More information about the svlug
mailing list