On Mon, Jun 17, 2019 at 4:09 PM Ronald F. Guilmette
<r...@tristatelogic.com> wrote:
>
> Sorry if this is off topic, but I'm having a very weird problem with
> the name "localhost" and I wonder if perhaps any of you folks could
> help me to sort it out.
There's probably nothing wrong with localhost per se...

>
> Basically, once I start up X and fvwm, I see that all of my xterm
> windows are automagically inheriting the following environment variable
> and the value shown:
How did you start up "X"?  Which "X" are you running? What OS and are
you using a login manager, display manager, etc?

>
>      DISPLAY localhost:0.0
Xorg inherits the DISPLAY value from its environment which is
generally set by your display manager (or xinit?) but I thought modern
X servers didn't listen on TCP by default.  AFAIK, having the host
specified in your DISPLAY will make it use tcp for the connection even
if the value is localhost and it sounds like maybe your system isn't
listening on TCP, which is pretty normal these days.

>
> For reasons I'm none too clear on, this worked just fine for me earlier,
> but I diddled a few things on this system since then and now I seem to
> have broken it somehow.  Now, when I try to start up *any* browser (and
> probably also any X application) I get rather cryptic failure messages.
> The one from teh Opera browser is clear enough.  It says it cannot connect
> to the X server on startup.
Perhaps you inadvertently set the value of DISPLAY in one of your dot
files and that's the actual problem?

>
> I futzed around trying to fix this problem for awhile and I managed to
> discover that if I manually set DISPLAY instead to just :0.0 then suddenly
> all my X applications start to work again.
Right, because it stops trying to use the TCP transport and uses local instead.

>
> Here is the output from the command "getent hosts localhost" on the system
> in question:
>
> ::1               localhost
> 127.0.0.1         localhost  localhost.tristatelogic.com
>
>
> What am I doing wrong?  Why doesn't the default value of localhost:0.0
> for DISPLAY work just as well as :0.0 ?
In summary, localhost:0.0 says to use the TCP transport for the
connection instead of local and your system is probably not listening
on tcp.  Not sure how you ended up there, though.  I suggest a liberal
use of "grep -r DISPLAY" in your home and maybe etc to try and locate
the culprit.

Reply via email to