9

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?

0

5 Answers 5

12

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
2
  • 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. Nov 13, 2014 at 0:47
  • I can't seem to find th .ini file on CentOS.
    – Overmind
    Apr 23, 2018 at 5:15
3

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.

2
  • 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, 2016 at 14:40
  • 2
    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. Oct 13, 2016 at 11:21
1

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")

0

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...)

0

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)

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .