Subject: Re: Xlib: Client is not authorized to connect to Server
To: Jeffrey Ohlmann <jaohlma@BGNet.bgsu.edu>
From: Christopher R. Bowman <crb@glue.umd.edu>
List: port-mac68k
Date: 12/07/1997 00:07:56
On Sat, 6 Dec 1997, Jeffrey Ohlmann wrote:

>
>I am a little vague on X terminology so please bear with my attempts to
>describe what I'm doing, and _do_ correct me where I'm wrong ...
>
>I am trying to run Netscape off of a remote host to display on my NetBSD
>machine.  I have X-windows working locally; i.e., I can use Mosaic, xterm,
>and so on, without trouble.  I can also view netscape on the MacOS side by
>using MI/X.
>
>At the remote host, I use
>	setenv DISPLAY 129.1.199.62:0.0
>and then
>	netscape &
>
>With MI/X on MacOS, this works fine (albeit painfully slow -- it's more of
>an experiment than a practical approach).  But with NetBSD, the remote
>host complains:
>	
>	Xlib: connection to "129.1.199.62:0.0" refused by server
>	Xlib: Client is not authorized to connect to Server
>	Error: Can't open display: 129.1.199.62:0.0
>
>Since I can get this to work on the MacOS side, I am guessing that the
>difficulty is somehere in the NetBSD configuration, but I really don't
>know where to begin looking.

sounds like access controlls on the X display (called the server since
it provides the display services).  The X protocal allows for a connecting
entity to grab keyboard strokes not necessarily designated for the window
you would associate with that entity, this presents a security
problem, to avoid this an access control mechanism is provided.  Do
a man xhost (or is it xhosts?) basically you want to type xhost + machinename
in a shell running on the display server machine (the shell must actually
be executing it's processes on the display server machine, not just
displaying there) where machine name is the name of the machine that needs 
to connect to the display server.

>I have added the remote host to /etc/hosts.allow.  For this change to take
>affect, do I need to completely reboot (i.e., `shutdown -r`; then boot
>from MacOS) or can I just `shutdown` to single-user and go from there?
>
>This not especailly important but even so I would like to understand
>what's happening here.
>
>Thanks,
>
>Jeffrey Ohlmann
>
>
>

---------
Christopher R. Bowman
crb@Glue.umd.edu
My home page