SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I pulled my Ethernet cable for some testing. Midnight commander (mc) had a grocery store four year old temper tantrum. mc delayed launching for about 60 seconds. An strace revealed there is some querying libnss, libresolv, /etc/hosts.
I seem to recall this issue being discussed at one time but perhaps my memory is fuzzy.
mc launches fine when dropping to or booting into runlevel 1.
Not just browsing them, do you have any nfs shares mounted or linked to the directory you were launching it in? The reason I ask is because I have a nfs share linked to my home directory. If I kill the network then a simple 'ls' in that directory will hang (takes about a minute after the network is dropped). I just checked it with 'mc' and launching it in my home with my wifi off will cause it to hang also (and work the second the network reconnects).
Edit: Also rc.K is run when going to runlevel 1, which unmounts nfs/cifs/samba shares, which would 'fix' the problem.
Edit your /etc/hosts file and add the full domain name:
Example: if you machine is called 'foo' on domain 'domain.net' then add 127.0.0.2 foo.domain.net foo
Edit your /etc/hosts file and add the full domain name:
Example: if you machine is called 'foo' on domain 'domain.net' then add 127.0.0.2 foo.domain.net foo
This has worked for me.
I added 127.0.0.1 localhost.localdomain to /etc/hosts after getting hit by this some time ago (I don't really remember when or where did I find this suggestion), but mc still jams. And OP is right, it's not related to any remote filesystems being mounted.
mc --version
GNU Midnight Commander 4.8.25
Built with GLib 2.46.2
Built with S-Lang 2.3.0 with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
cpiofs, tarfs, sfs, extfs
Data types:
char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
Were you in your home directory when you launched mc?
Or, more generally, were there any network shares mounted in the current directory when you launched mc?
If mc has to stat() any network directories (for size, under the column "size") then it has to, you know, talk to the server over the network. And the default timeout for NFS is 60 seconds, according to nfs(5).
And if none of this applies, then feel free to ignore this comment.
"Ghosts in the machine. Random segments of code that have grouped together to form unexpected protocols." In other words, computers always do as instructed and not what is expected.
Years ago in my dial-up days I crafted an extensive /etc/hosts file to help with the connection. Dial-up is so painful that I used to do things like block images. Every little tweak helped oh so long ago.
Some years later I moved from dial-up to fixed wireless. Fix wireless is many times better than dial-up, but still slower than what many people in urban areas expect.
Out of habit and because fixed wireless is not the fastest, I still maintain an extensive hosts file to help the connection.
With respect to mc launching so horribly slow, I found some old cruft in /etc/hosts that seems to have been the root cause. Too many references to 127.0.0.1. My memory is fuzzy why I used those snippets but I do remember them serving a purpose long ago. Possibly mc was cycling through each one of those lines. Doesn't really matter and I lack the energy or curiosity to investigate.
Somewhat odd I never ran into this problem for so many years. Conversely, my original report in this thread was pulling the Ethernet cable, which I seldom do or seldom would ever do. So perhaps not so odd -- I just never satisfied the necessary conditions to notice the quirk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.