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

gethostbyname() always does DNS lookup when DISPLAY is set


i'm facing a really weird problem on my machine. when doing "telnet localhost" 
my machine always does a DNS lookup even if

- host.conf: order hosts, bind
- nsswitch.conf: hosts: files dns
- localhost is defined in /etc/hosts

now, if i do 'unset DISPLAY' this behaviour goes magically away ...

- DISPLAY not set -> network not touched
- DISPLAY=:<displaynum> -> dns lookup made
- DISPLAY=<host>:<displaynum> -> network not touched

this looks extremely weird to me: dns does not have anything to do with X, 
does it ? also, on the debian machine of a friend i cannot trigger this 
behaviour, even with identical /etc/hosts, /etc/host.conf, /etc/
resolv.conf, /etc/nsswitch.conf

this is very annoying too, since when the network is down, starting KDE/gnome 
apps takes ages (it takes as long as a DNS timeout)

another very weird thing: on my system, by default, libraries come from 
/lib/tls, on my friends system they come from /lib. ld.so.conf is identical. 
moving away /lib/tls has no effect on the dns lookup behaviour.

Someone knows what could be the origin of this problem ? and somebody knows 
what /lib/tls is for ?


Frank Dekervel
Mechelsestraat 88
3000 Leuven
frank.dekervel@student.kuleuven.ac.be, (nieuw) 0473/94.34.21

Reply to: