mc hangs temporarily when network is down

Midnight Commander startup is usually instantaneous, but when the network (eth0) is down, mct takes over a minute to start.

This is a known problem. See:

#40 (savannah: MC doesn’t open if network gateway inaccessible.)](http://www.midnight-commander.org/ticket/40) (07 Jan 2007)

for example. The problem seems to be caused by mc’s use of samba.

Is there a known solution or circumvention? The above file advises me to "comment out the eth0 interface from the smb.conf "; however, my /etc/samba/smb.conf seems to have no eth0 interface.

The “man mc” file mentions that “smbfs” is one of the virtual file systems used internally by mc. I tried reducing the “vfs” timeout in the “.mc/ini” file from 60 to 5, but this had no effect on the startup time.

On 2011-03-03 20:06, NonZ wrote:
>
> Midnight Commander startup is usually instantaneous, but when the
> network (eth0) is down, mct takes over a minute to start.

In my laptop I have often that circumstance, and I have no problem with mc
starting. I will have to try again…

…]

Yes, instantaneous.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thanks! Your information was helpful. It led me to try mc on my laptop as well – and I see that it works fine there when the network connection is down. So all I have to do now is compare laptop and desktop configurations.

The desktop does have one strange problem. xfce always comes up with the following warning message:

Could not look up internet address for x1-6-00-0c ...

I compared /etc/hosts files, and found only one difference:


Laptop:   127.0.0.2  linux-4xt8.site, linux-4xt8
Desktop:  127.0.0.2  linux-vnpi.site, linux-vnpi

I compared /etc/host.conf files and found no differences.

I compared /etc/resolv.conf and found a big difference. Laptop has nothing, desktop has the following four lines:


search cgocable.net
nameserver 24.226.1.93
nameserver 24.226.10.193
nameserver 24.226.10.194

I see that “resolv.conf” is generated automatically by “netconfig”. However, the laptop and desktop /etc/netconfig files are identical – so why the difference in “resolv.conf”, then?

I looked up “man resolv.conf”. That document suggests that the “nameserver” lines are optional: The default is to use “the name server on the local machine”.

I don’t follow what “man” says about the “search” line. Later, however, under “sortlist”, “man” mentions “gethostbyname” – which, as I recall, was also mentioned in the “mc” bug file at the link I posted above.

Interesting! What happens if I save the desktop “resolv.conf” then remove the extra lines?

On 2011-03-03 23:06, NonZ wrote:
> Interesting! What happens if I save resolv.conf then remove the extra
> lines?

Don’t.

Read the comments in the file about not doing it.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

The /etc/resolv.conf file refers me to /etc/sysconfig/network/config. There, I find another difference between the desktop and the laptop: On the desktop, I have:

NETWORKMANAGER="no"

I think I will change the setting to “yes”. But before I do that, I want to find out where the extra nameserver records in resolve.conf came from. That seems like a question that is best addressed to the network forum here. There’s no mention of the nameserver addresses in /etc/sysconfig/network/config.

On 2011-03-04 19:06, NonZ wrote:
>
> robin_listas;2297924 Wrote:

> Code:
> --------------------
> NETWORKMANAGER=“no”
> --------------------
>
>
> I think I will change the setting to “yes”.

Don’t, not directly. Use Yast network configuration. It changes a lot of
things. If it is a desktop connected to an ethernet cable, don’t do it, use
the traditional ifup method (in yast).

> But before I do that, I
> want to find out where the extra nameserver records in resolve.conf came
> from. That seems like a question that is best addressed to the network
> forum here. There’s no mention of the nameserver addresses in
> /etc/sysconfig/network/config.

They come from the network manager, if defined, which is not. Then they
could come from automatic network configuration, ie, dhcp-client. Check YaST.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)