I installed Midnight Commander and tried to change the colour scheme, but unfortunately, it doesn't apply the ~/.mc/ini file.

It's Midnight Commander 4.8.1, on Ubuntu 12.04. When I installed it, it didn't have the .mc folder, so I had to create it first. I've searched the internet and found nothing useful.

Does anyone have any ideas on how I can fix this?

The configuration is stored in

$HOME/.config/mc/

In your case edit the file $HOME/.config/mc/ini. You can check which files are actually read in by midnight-commander using strace:

strace -e trace=open -o mclog mc
  • 1
    There might be something else going on. If I edit ~/.config/mc/ini before launching mc, change, say, old_esc_mode=0 to 1, then launch mc, exit it, and check that file again - old_esc_mode will still be 0. – Dan Dascalescu Nov 13 '14 at 0:47
  • I can't seem to find th .ini file on CentOS. – Overmind Apr 23 at 5:15

Try to edit settings before you launch mc itself, using nano or any other editor (but not the mcedit). Looks like mc saves current (at the launch time) setup settings each time you quit the file manager.

  • Hi welcome to SuperUser! Are you able to expand your answer with some evidence about when the software saves it's settings file? – Burgi Feb 16 '16 at 14:40
  • 1
    This was my problem as well, I edited .config/mc/ini with mcedit, which didn't work because it would be overwritten by mcedit. Using nano worked. – Stefan Seidel Oct 13 '16 at 11:21

Did you use F9/Options/Save setup?

I'm asking because I had a similar problem (mc didn't save the panel sort order). It turns out that there's probably been some default settings change and now mc doesn't save changes to the configuration automatically anymore (that was the behaviour I was expecting...)

mc/mcedit has a config option called auto_save_setup which is enabled by default. This option automatically saves your current setup upon exiting. The problem occurs when you try to edit ~/.config/mc/ini using mcedit. It will overwrite whatever changes you made upon exiting, so you must edit the ~/.config/mc/ini using a different editor such as nano.

Source: https://linux.die.net/man/1/mc (search for "Auto Save Setup")

Check folder owner for ~/.config/mc folder. It should be same (your user) as others items in ~/.config has.

ls ~/.config -l

If not - change owner to your's user. (via chown, or remove folder under root and create under your user)

  • My point was to suggest you edit and add this to your answer to make it complete. – Pimp Juice IT Aug 17 '17 at 19:43

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.