LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-26-2020, 06:43 PM   #1
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Question Why does mc need networking to launch?


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.

Lose the Ethernet link and the hissy fit starts.

I did not test with wireless.

Thanks.
 
Old 09-26-2020, 09:18 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Why does mc need networking to launch?

Were you using it to browse network shares?

I've not seen that behaviour before, but I generally don't use the networking features much.
 
Old 09-26-2020, 09:35 PM   #3
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
Were you using it to browse network shares?
Nope.
 
Old 09-26-2020, 09:43 PM   #4
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 765

Rep: Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864
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.

Last edited by 0XBF; 09-26-2020 at 09:55 PM.
 
Old 09-29-2020, 03:34 AM   #5
perseus12
Member
 
Registered: Oct 2012
Location: here and there
Distribution: Slackware Current, FreeBSD 12.0, LFS 10.1
Posts: 77

Rep: Reputation: Disabled
Try the following:

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.
 
Old 10-04-2020, 02:06 AM   #6
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by perseus12 View Post
Try the following:

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.
 
Old 10-04-2020, 12:30 PM   #7
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Recompiled the most recent one (on 14.2) and disabled all vfs that I don't use:
At this point, it works fine here, and does not require networking.
Code:
  --disable-vfs-fish \
  --disable-vfs-ftp \
  --disable-vfs-sftp \
  --disable-vfs-smb \
  --disable-vfs-undelfs \
Code:
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;
 
Old 10-04-2020, 08:31 PM   #8
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
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.
 
Old 10-12-2020, 04:52 PM   #9
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
I'm tagging this thread as solved.

"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.
 
Old 10-12-2020, 06:34 PM   #10
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
A face-palm moment, to be sure. I'd say "may it never happen again," but as we all know, it probably will.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KDE launch display No Signal (after wine Steam Deus Ex launch crash) KGHN Slackware 5 01-21-2015 10:38 PM
[SOLVED] Zorin dock launch (ie quick launch) instalation and use provobis Linux - Newbie 4 01-16-2015 07:25 PM
Unable to launch application from workstation but able to launch from vnc chaitanya1982 Linux - Desktop 2 04-30-2010 03:52 AM
Does anyone know why 'Audacious' takes forever to launch...? perry Slackware 4 01-11-2008 01:09 PM
Why does Thunderbird launch Epiphany? schmmd Linux - Software 3 09-23-2004 01:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration