On Thu, Nov 25, 1999 at 12:28:35PM -0500, Miguel Avillez wrote:
| Startx only works, at least does not take ages to start, when my linux box
| is connected to the net.
| whenever I have my box unconnected startx takes ages or may not work at
| all.
| So, I am wondering if Xwindows is net-dependent. How can I have my
| xwindows start at any time with/without connection to the net?

This is a classic symptom of doing DNS lookups when DNS isn't actually
available (lots of long timeouts while the dns goes trying to get
stuff).

Perhaps something is trying to look up a name from an IP # (or vice versa,
but usually IP->name). Check two things:

        - In /etc/nsswitch.conf, the line:
                hosts:      files dns
          should have "files" before "dns", so that your OS consults
          the /etc/hosts file _before_ asking DNS for stuff.

        - Are all you local machines in your /etc/hosts? It's prudent to have
          your core stuff there so that you're not dependent upon DNS for
          your home net.

Here's my /etc/hosts:

    127.0.0.1       localhost localhost.home
    192.168.1.1     skaros-hme0 skaros skaros.home proxy proxy.home smtp smtp.home 
news news.home
    192.168.1.2     janus-eth0 janus janus.home
    192.168.1.3     alpha-eth0 alpha alpha.home firewall pop
    192.168.1.4     fred-eth0 fred fred.home
    192.168.1.6     doze-eth0 doze doze.home
    192.168.2.2     nancy-le0 nancy nancy.home
    192.168.2.1     skaros-le0 skaros-le0.home
    203.12.97.2     ntp.zip.com.au
    130.155.98.1    tictoc.tip.csiro.au
    140.79.17.101   terss.hba.marine.csiro.au

In order, that's

        localhost, the internal (logical) interface
        skaros, my solaris Sparc10: web server, squid etc etc
        janus, our dual Celeron linux box
        alpha, my personal desktop machine and the firewall/modem box;
                a DEC Alpha linux box
        fred, our aged Pentium machine, soon to run various OSes for
                learning and fun
        doze, our Windoze installation under VMWare on janus
        skaros-le0 is the sparc's 10 meg interface (hme0 is the 100meg)
        ntp.zip, tictoc and terss: 3 NTP servers

This lets the nameservice on the machine obtain IP and hostnames for everything
it has any cause to ask questions about while offline without consulting DNS,
which will want to go offsite for stuff.

The NTP servers are there so the NTP stuff can start up when we boot with the
modem off (as it will be at boot time for the firewall...)

Having these "real" NTP names/addrs in the hosts file leaves us
vunerable to their addresses changing (which is, of course, one of the
things DNS is there to look after). Provided we keep the list of "real"
hosts there very small, this is an effective tradeoff.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

Haven't been there. Don't want to go. Don't need another t-shirt!
        - Lisa Varner <[EMAIL PROTECTED]>


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to