In message <20190618003925.a49a1156e...@mail.bitblocks.com>, Bakul Shah <ba...@bitblocks.com> wrote:
>> I really would like to understand why manual edits to /etc/hosts seem >> to have no effect whatosoever. That's issue/question #1. >> And more importantly, I'd really still >> like to know whey X applications cannot seem to connect to the X server >> when and if DISPLAY is set to localhost:0.0 while they have no problem >> doing so when DISPLAY is instead set to :0.0 This is issue/questuon #2. >I ran into this as well. I tried tracing getent() through >networking code in libc but this is quite a mess. And gdb >doesn't work reliably either. No doubt there are some new >switches I haven't explored. And threading. Ok, I have an answer now on question #2. I asked some people who know way more about X than I do (which is actually almost eerybody), and as a result I found out the whole story. It seems that at some point it time, somebody decided that it would be Good if the default configuation(s) of the X server would no longer talk to clients, by default, using TCP. (I can only assume that this was most probably a very wise security improvement for the X server at the time.) So anyway, the other thing I learned is that if one has a hostname... i.e. *any* kind of a hostname... in one's DISPLAY environment variable value, then X clients will all try to connect to the server using TCP. And that will fail, as it should nowadays. Apparenttly this even includes "localhost", which is sort of a special kind of a hostname. My problem was that... unbeknownst to me... I had the following line, left over from ancient times, in one of my tcsh shell startup files: setenv DISPLAY localhost:0.0 I simply removed that, quit X, logged out, and logged back in again, and then started X again, and everything was perfect after that, most probably because all of my processes (after starting X) were now inheriting a proper and modern sort of value for DISPLAY, which is to say ":0". That's all there was to it. I'm still totally in the dark about Question #1 (above) however, but that is just a matter of idle curiosity now, now that I have all of my X clients working properly. Regards, rfg _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"