Problem
I try to run clients remotely but I receive errors:
Xlib: connection to "hostname:0.0" refused by server Xlib: Client is not authorized to connect to Server Error: Can't Open display
Cause
The host that you are trying to display the clients on does not grant the control access to the host that runs the client.
Solution
Run xhost(X) to grant access to remote hosts.
For example, your local host is "podgy". You telnet to remote host
"fusion" and want to run some clients from "fusion" and display them
on "podgy".1. Log in to podgy.2. Start the X environment at podgy. For example, enter the command
startx from the command line, or log in from xdm.3. Grant control access to fusion:# xhost +fusion3. Telnet to fusion.4. Set the PATH environment variable.For Bourne shell:# PATH=$PATH:/usr/lib/X11
# export PATHFor C shell:% set path=($path /usr/bin/X11)5. Run the clients from fusion and display them on podgy.
# xeyes -display podgy:0 &NOTES:- Intead of specifying the "-display" option for each client
program you invoke, you may want to instead set the DISPLAY
environment variable. Then any X client invoked will use
that display.For Bourne/Korn shells:# DISPLAY="podgy:0"
# export DISPLAYFor C shell:% setenv DISPLAY="podgy:0"Then, to invoke the xeyes client for an example:
# xeyes &- Intead of running the xhost command manually every time
the X server is started, you can pre-specify which clients
can be displayed to your X server. For example, for your
primary X server, you could include the line "+fusion" in
the /etc/X0.hosts file on the podgy machine. Please see the
man page on xhost(X) for further details. See also
1. xhost(X). 2. The article "How do I run multiple X servers and local or remote X clients?" from the same database.