2

Unable to start midnight commander under Ubuntu. It's a server, where I was using it for a lont time always. Today I logged in and found mc hangs on start.

dims@sagittarius-a:~$ mc

and nothing happens.

Reinstall didn't help.

Removing config

rm -rf .config/mc

didn't help.

Removing global config

sudo rm /etc/mc

and reinstall causes

dims@sagittarius-a:/etc$ mc
sfs_init(): Warning: file /etc/mc/sfs.ini not found

i.e. didn't help and config files didn't restored dusring install by some reason.

What else can be tried?

UPDATE

Wow! It just loads long! No less than 60-100 seconds. It appeared while I was writing this. So the question persists: what does it do so long? Calculating mass of proton? How to wean it from this habit?

UPDATE 2

Reinstalling MC doesn't help.

UPDATE 3

Recently I configured my globally the domain name, which I am using as default in my LAN. Now, the commands like

dims@sagittarius-a:~$ host anything
anything.MYDOMAIN is an alias for MYDOMAIN.
MYDOMAIN has address GLOBAL_IP_OF_MY_SITE_1
MYDOMAIN has address GLOBAL_IP_OF_MY_SITE_2

I read, that MC does some DNS lookup on startup and it can slow the process. I would like to understand, what is happening to make my own correct configuration, because answers in that question are incomplete.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
Dims
  • 3,255
  • Just a gloss: I had problems with startup of dolphin (kde) because of smb mount points inside home directory. Dolphin calcuates the size of directory contents what may be take a while on slow network mount points. I don't know if there is any parallel to the startup of mc. – ChristophS Jun 09 '17 at 05:56

2 Answers2

2

My mc also takes around 1 minute to boot.

I straced it and it is due to my PROMPT_HISTORY being redefined to readonly; cant remember the specifics, but it seems mc makes a pause and tries to rewrite it a couple of times.

I have not looked at the source code, however I would venture to say the pauses are a feature of mc.

I would advise stracing it and/or looking at the source code.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
1

Seems like your troubleshooting is all wrong.

Before deleting config and reinstalling you should have checked:

  1. Server Load. Before and after running mc
  2. process status and consumed resources
  3. dmesg to check for possible hardware failures
  4. Free/Used disk space and Free/Used RAM

Since you did not check any of the relevant information, it is not possible to know what could be wrong with mc

Bruno9779
  • 1,384
  • I don't think his trouble shooting is necessarily wrong. Perhaps incomplete. I think you make some good suggestions because those types of system issues could cause it, however it is also likely they would impact other applications or processes for which he apparently has not noticed any impact. Of course though, I agree with you, it doesn't hurt to at least check the basics. I think it's wrong of you to assume his troubleshooting is wrong because the steps he did try are at least relevant steps based on the application. Instead, it's obvious that there were additional steps he should take. – Joshua K Jun 04 '17 at 02:37