[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Conecting with xhost



chainy said:
> This must be something really easy, but i can't find the solution.
>
> Each time i try to edit a file with emacs the xterm dumps this:
>
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> emacs: Cannot connect to X server :0.0.
> Check the DISPLAY environment variable or use `-d'.
> Also use the `xhost' program to verify that it is set to permit
> connections from your machine.

Are you trying to load xterm as another user? maybe trying
to load a root xterm? Debian by defaut X does not listen
on TCP ports for incoming connections.  You can change this
behavior by taking out the -nolisten tcp option in one
of the files in /etc/X11 (I forgot which since my machines
already have it off) just do a grep -nri nolisten-tcp /etc/X11/*

if your not running as root, the most common reason for this
happening that I have encountered is the hostname of the machine
changing. E.g. you use DHCP, and your lease expires and the
hostname changes as a result then everything in X breaks(that
is assuming DHCP is configured to adjust your hostname according
to what it gets from the server). The only workaround I know
here is to just exit X and restart it. Reconfigure teh DHCP
server, or your DHCP client, use a static IP instead of DHCP..
on my DHCP servers I assign my systems static IPs, so I
can still use DHCP, but I always get the same IP.

if thats not the reason, then I am not sure what is wrong..

nate





Reply to: